RagChat transforms unstructured data for LLM interaction.
Project description
RagChat
RagChat transforms unstructured data for LLM interaction. Addressing key challenges such as dynamic content updates, diverse data sources, and retrieval accuracy, it incorporates an upsert-first design, flexible filtering, and knowledge graphs alongside vector search for more capable knowledge management. Features including multi-user support, pluggable models, and self-hosting provide operational flexibility and control.
Features
- Upsert-first design: Supports constant updates.
- Flexible metadata filtering: Information retrieval allows using custom fields.
- Efficient knowledge graph: Graph is built using small models, promoting efficiency and scalability.
- Multiuser support: Knowledge bases can be isolated or shared.
- Language consistency: Manually crafted prompts and examples ensure LLMs consistently use the same language, improving reliability.
- Async batch processing: Ingestion and processing of multiple documents can be done in parallel with streaming progress feedback.
- Pluggable LLMs and Embedding models: Supports the use of custom models or connection to API endpoints; providers are easily swappable.
- Open source & self-hostable: Operation occurs locally in Docker or directly on a machine, ensuring privacy.
Use Cases
- Casual chat sessions with memories
- Technical documentation search
- Chat+file hybrid RAG with citations
- Personal use
- Multi-user setups
Quick start
Docker Compose is required for the easiest setup.
Install RagChat with pip:
pip install ragchat-ai
Configure environment variables:
git clone https://github.com/raul3820/ragchat.git
cd ragchat
cp .env.example .env # Add API keys or check ports for local setup
Example: Open Webui
Run dependencies with:
docker compose up --build
After startup, the web chat UI is accessible at http://localhost:3001 (refer to .env for port).
Retrieval will be applied to all models. Two flows are presented:
- Casual chat with memories (default)
- Formal RAG with citations (triggered by writing
#in the chat and selecting a file)
For file ingestion use: http://localhost:3001/workspace/knowledge
Example: Lihua benchmark with Python SDK
Run dependencies with:
docker compose up neo4j --build
Once the DB has started, run the file ingestion with:
python -m examples.lihua.step0_index
and the Q&A with
python -m examples.lihua.step1_qa
Contributing
Contributions welcomed:
- Bug reports (issues)
- Feature suggestions
- Pull requests (inclusion of tests requested)
Roadmap
- Performance:
- Quick retrieval
- Query decomposition
- Better reranking
- Recency weighting
- Structured aggregates
- Graph traversal
- Custom tuning
- Flows:
- Chat
- File
- Group chat
- Web search
- Integrations:
- Python SDK
- REST API server
- Neo4j
- Neo4j optimization (vector indexing, quantization)
- Memgraph? (lower priority)
- Docling
- MCP
- Open-Webui (pipelines)
- Testing & Evals:
- LiHua benchmark setup
- LiHua benchmark comparison with other libraries
- Integration test
- Increase test coverage
- Security:
- Custom fields sanitization
- Documentation:
- Readme/Quick start
- Library documentation
- API documentation
Open Source & License
RagChat is MIT-licensed (see LICENSE). Self-hosting and extension are permitted. Certain features may require user-provided LLM/API keys.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ragchat_ai-0.1.0.tar.gz.
File metadata
- Download URL: ragchat_ai-0.1.0.tar.gz
- Upload date:
- Size: 65.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1952f6da8caca9c1dbc0f890a5105e05c4cda23f93e2fa3aa12f370df6931af
|
|
| MD5 |
224a546b5f367dfb28b97389ca967fd1
|
|
| BLAKE2b-256 |
c0237d6b493297ed2135031a967ffa476e9edb63f0221d6fdbbd3f27e31a92cf
|
File details
Details for the file ragchat_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ragchat_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 68.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92ca4dffd1729bb81bf0f1d555dfc8de90740684deb4de36c03ceadc7c39d532
|
|
| MD5 |
0fa85af0332361cb1b21e821347859e5
|
|
| BLAKE2b-256 |
97d4b12ddfbb75db06e8961852ed3dc7350989ea5e21554b9eb1bf53ef5a473d
|