Following this to create a RAG without langchain.
This project implements streaming and RAG over pdf, and gives answer according to the pdf provided. Implemented using:
- FastAPI
- Postgres
- Ollama
- SvelteKit
- Docker
I wanted to create a app that didn't use langchain, although using it would have been quite easy. Since langchain is a framework and hides away a lot of complexities behind its abstractions customizing it can be a pain.
Here is how it works in normal chat (It's a little slow in the first response):
Screen.Recording.2024-06-25.at.1.18.22.PM.mov
Here is how it works in Pdf chat, I used the famous overleaf software engineer resume:
newmovie.mov
To run this just run
docker compose up --build
it will start front end and backend on the same host
Frontend: http://localhost:5173/
Backend: http://localhost:8000/docs (FastAPI)
- Response streaming (typing words as soon as it is recived from server)
- Pdf Chat (upload a pdf and ask questions about it)
- Normal Chat (you can chat normally, Currently using llama3 model but can be customized)
- Preserving context over chats (after uploading pdf, its context should be cached or saved)
- Caching responses to produce better results
- Make UI more good looking
- Add support for images, videos etc.
- Fast responses