- 🤔 What is ThinkRAG
- ✨ Key features
- 📝 Demo
- 🛫 Quick Start
- ⚙️ Set API Key
- 📖 Engine Interface Instructions
- 🪀 Model Support
- 📄 License
- 🔜 Future Plans
- ❓ FAQ
- ☎️ Contact Us
ThinkRAG is an open-source RAG engine that based on document retrieval.
Expand
ThinkRAG allows users to upload, manage, and index content from both files (like PDFs, DOCX, and TXT files) and web pages. This includes setting parameters for text processing to ensure optimal data organization and retrievability.
ThinkRAG offers extensive settings for configuring APIs, including setting up service addresses, selecting models, and enabling specific features like re-ranking for embedding models. This facilitates integration and management of various language and embedding models that can be used for enhanced data processing and retrieval within the knowledge base.
ThinkRAG also includes advanced settings that allow users to further refine system behaviour and interaction modes, such as adjusting response selection criteria and customizing system prompts.
As a open-source multimodal vector database, LanceDB has following core advantages:
- Optimized for Time Series Data: Designed specifically for handling time series data, making it ideal for real-time monitoring, IoT device data, financial trading data, and more.
- High Performance: Offers high data ingestion rates and fast query performance, suitable for real-time analytics.
- Scalability: Supports horizontal scaling, enabling increased load handling by adding more nodes.
- Efficient Data Compression: Utilizes advanced data compression techniques to optimize storage and enhance I/O efficiency.
- Flexible Data Retention Policies: Allows for customizable data retention policies, supporting automatic downsampling or deletion of old data.
- Robust Query Language: Provides a powerful and flexible query language to facilitate complex data analysis and aggregation directly in the database.
- Integrated Visualization Tools: May include integrated tools for data visualization and dashboarding, simplifying data monitoring and analysis.
Visit here to learn more about LanceDB.
Expand
Try our demo here!Expand
pip3 install -r requirements.txtRefer to here to download embedding models and nltk data into localmodels directory
If you need LLMs API, please set your corresponding API Key first, see Set API Key for detailed instructions.
Then, run ThinkRAG by the following command (after returning to the root directory of ThinkRAG):
streamlit run app.pyExpand
export VARIABLE_NAME=valueFor instance, to set your API key for OpenAI, just run the following line in your terminal:
export OPENAI_API_KEY=your_OpenAI_API_key nano ~/.zshenvFor Linux, macOS Mojave (10.14) or earlier version, run
nano ~/.bashrcexport VARIABLE_NAME="value"For instance, to set your API key for OpenAI, just type the following line into your '.zshenv' (or '.bashrc') file:
export OPENAI_API_KEY=your_OpenAI_API_key You may now save changes by pressing 'Ctrl + O', then press 'Enter' to confirm, and 'Ctrl + X' to exit the editor.
To ensure the changes take effect in your current terminal session, you can source the file by run
source ~/.zshenv
# source ~/.bashrc for Linux, macOS Mojave (10.14) or earlierExpand
set VARIABLE_NAME=value # Set Temporary API Keysetx VARIABLE_NAME "value" -m # Set Permanent API KeyExpand
See here for detailed instructions about ThinkRAG's key features and how to use them for your own customized purposes.
Expand
ThinkRAG supports Ollama and the following models were tested. To use these Ollama models, you need to install Ollama on your device.
To install your preferred Ollama models, run this command in your terminal:
ollama pull <model_name>We suggest you to specify the model_name otherwise it will point to the latest, smallest sized-parameter model that fits the name you indicate, which may not be the model you actually want.
Once the installation is complete, you may double-check that viewing all the models you have pulled via:
ollama listor directly run a certain model via:
ollama run <model_name>Take gemma:2b for example:
ThinkRAG uses MIT License. See here for details.
