https://github.com/komangandika/rag-langchain-mistral
Using RAG(Retrieval-Augmented Generation) to retrieve informationn from 10 LLM research paper, the LLM I am using Mistral 7b with LangChain Framework
https://github.com/komangandika/rag-langchain-mistral
faiss langchain llm mistral mistralai rag
Last synced: about 2 months ago
JSON representation
Using RAG(Retrieval-Augmented Generation) to retrieve informationn from 10 LLM research paper, the LLM I am using Mistral 7b with LangChain Framework
- Host: GitHub
- URL: https://github.com/komangandika/rag-langchain-mistral
- Owner: KomangAndika
- Created: 2024-07-04T07:17:44.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-20T09:18:34.000Z (8 months ago)
- Last Synced: 2025-01-21T16:26:25.069Z (3 months ago)
- Topics: faiss, langchain, llm, mistral, mistralai, rag
- Language: Jupyter Notebook
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RAG-LangChain-Mistral
Using RAG(Retrieval-Augmented Generation) to retrieve informationn from 10 LLM research paper, the LLM I am using Mistral 7b with LangChain Framework. The Mistral model I am using is quntized with NF4 Quantization useful to reduce the model size and usage of VRAM but still kinda keeping the accuracy
## RAG(Retrieval-Augmented Generation) with LangChain
Rag typically has two main components:
1. Indexing, basically pipeline to ingest data (Usually done Offline).
2. Retrieival + Generation, this is the actual part of the RAG, receive user query and retrieve relevant data from index and passing the model.
### Indexing
- Loading Document, using document loaders, can be from Google Drive, Notion, Slack, but in this case I am using kaggle database(or basically local kaggle notebook).
- Split, using text splitter to break documents into smaller chunks, useful for indexing and feeding the model.
- Store, place to store and index the splits (VectorDB and Embedding model are here), the VectorDB I am using is FAISS and sentence-transformer for embedding.### Retrieval + Generation
- Retrieve, given the user input, retrieve relevant splits from the VectorDB(FAISS).
- Generate, using chatmodel/LLM(in this case Mistral 7b) to produce respose based on user prompt and retrieved data