...
- Load the data
- Load the data from websites, GitHub Repo, or maybe search for answers on Google and use the results as verbs.
- Data processing
- Text tokenization
- Create embeddings
- Using any embedding algorithm provided by HuggingFace or OpenAI, however, choosing the algorithm is critical in terms of time because the process of creating embeddings takes a lot of time.
- Create a vector database
- Using a cloud vector database to keep the history of the chat and also keep any data we got from the previous search process. We may use Qdrant to achieve this goal or deploy any vector database like chromaDB, Pgvector, or Faiss.
- I have a great experience with vector databases because I've participated in implementing a vector database indexer project so I know they work and the algorithms used to implement them.
- LLM
- I want to talk about this point specifically because it’s critical, we want to use LLM cheap, efficient, and fast.
- The response of LLM doesn’t only depend on the model implementation itself but also on the way we run it.
- So, we may choose any open-source model from Hugging Face. But what difference can we make?
- The answer is using LPU or to be more precise we will use Groq. Groq is a free API that provides us with free fast LLMs like llama-2. The speed of Groq is 500 tokens/second which is so much faster than gpt-3.5 and Gemini. To be clear Groq isn’t an LLM but it’s a way we can use our LLM fast.There are multiple greater models on Huggingface with an Apache 2.0 License and they are created for question-answering tasks like Intel/dynamic_tinybert, distilbert/distilbert-base-cased-distilled-squad, FlagAlpha/Llama2-Chinese-13b-Chat,
- Create back-end APIs
- I recommend using Python frameworks like Django to build our back-end and endpoints because the part that deals with LLM and gets its response will be implemented in Python so , and to make the interface between them easy it’s a good idea to build the back-end using Python.
- Create front-end
- There is no doubt that React is a great front-end framework in terms of performance.
- I think the website has the following features:
- Create an account: Sign in/ Sign-up
- Chat with LLM
- Show search history
- Clear History
- Continue as a guest (without memory)
- Integrate the front end with the back end
- Deploy the website
...