A simple local rag system, used to verify and improve related rag system technologies.
- Use langchain/langgraph + local milvus implement the local rag system.
- Use streamlit implement the web ui.
- Hybrid search (vector search + keyword search), RFF for rerank.
- Use Ragas evaluate the rag system.
- Use model based reranker (e.g. ColBERT.).
- Multi-modal support (e.g. image).
# Configuration in run.sh
export BASE_URL="api_address"
export API_KEY="your_api_key"
export MODEL="model or endpoint"
- start the server by running
./run.sh - start streamlit by running
streamlit run streamlit_app.py
Use Ragas to evaluate and iteratively improve our rag system.
model: "deepseek-V3.1"
Results: 64/66 passed (97.0%)
If you want to use BAAI/bge-reranker-base as the rerank model, you need to start the model server first.
vllm serve BAAI/bge-reranker-base
Then, set the RANKER_ENDPOINT environment variable in run.sh.
export RANKER_ENDPOINT="http://xxx:8000"
Apply the patch 'script/langchain_milvus.patch' to langchain_milvus lib, because current langchain_milvus version not support model rerank.
This project is licensed under the MIT License - see the LICENSE file for details.