Skip to content

Commit 90ae364

Browse files
committed
update readme
1 parent c18baf2 commit 90ae364

File tree

1 file changed

+38
-8
lines changed

1 file changed

+38
-8
lines changed

README.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55

66
Flare AI template for Retrieval-Augmented Generation (RAG).
77

8+
## 🚀 Key Features
9+
10+
* **Modular Architecture**: Designed with independent components that can be easily extended.
11+
* **Qdrant-Powered Retrieval**: Leverages Qdrant for fast, semantic document retrieval, but can easily be adapted to other vector databases.
12+
* **Unified LLM Integration**: Supports over 300 models via OpenRouter, enabling flexible selection and integration of LLMs.
13+
* **Highly Configurable & Extensible**: Uses a straightforward JSON configuration system, enabling effortless integration of new features and services.
14+
815
## 📌 Prerequisites
916

1017
Before getting started, ensure you have:
1118

12-
- A **Python 3.12** environment.
13-
- [uv](https://docs.astral.sh/uv/getting-started/installation/) installed for dependency management.
14-
- An [OpenRouter API Key](https://openrouter.ai/settings/keys).
19+
* A **Python 3.12** environment.
20+
* [uv](https://docs.astral.sh/uv/getting-started/installation/) installed for dependency management.
21+
* An [OpenRouter API Key](https://openrouter.ai/settings/keys).
22+
* Access to one of the Flare databases. (The [Flare Developer Hub](https://dev.flare.network/) is included in CSV format for local testing.)
1523

16-
## Environment Setup
24+
## 🏗️ Environment Setup
1725

1826
### Step 1: Install Dependencies
1927

@@ -25,25 +33,47 @@ uv sync --all-extras
2533

2634
### Step 2: Configure Environment Variables
2735

28-
Set your OpenRouter API key in your environment:
36+
Rename `.env.example` to `.env` and add in the variables (e.g. your [OpenRouter API Key](https://openrouter.ai/settings/keys)).
37+
38+
Verify your available credits and get all supported models with:
2939

3040
```bash
31-
export OPENROUTER_API_KEY=<your-openrouter-api-key>
41+
uv run python -m tests.credits
42+
uv run python -m tests.models
3243
```
3344

34-
## 🚀 Running the Flare-AI-RAG
45+
## 🚀 Running the Flare-AI-RAG Locally
3546

36-
- **Setup a Qdrant service**: make sure that Qdrant is up an running before running your script.
47+
### Step 1: Setup a Qdrant Service
48+
49+
Make sure that Qdrant is up an running before running your script.
3750
You can quickly start a Qdrant instance using Docker:
3851

3952
```bash
4053
docker run -p 6333:6333 qdrant/qdrant
4154
```
4255

56+
### Step 2: Configure Parameters and Run RAG
57+
4358
The RAG consists of a router, a retriever, and a responder, all configurable within `src/input_parameters.json`.
4459

4560
Once configured, add your query to `src/query.txt` and run:
4661

4762
```bash
4863
uv run start-rag
4964
```
65+
66+
## 🔜 Next Steps & Future Upgrades
67+
68+
Design and implement a knowledge ingestion pipeline, with a demonstration interface showing practical applications for developers and users.
69+
All code uses the TEE Setup which can be found in the [flare-ai-defai](https://github.com/flare-foundation/flare-ai-defai) repository.
70+
71+
_N.B._ Other vector databases can be used, provided they run within the same Docker container as the RAG system, since the deployment will occur in a TEE.
72+
73+
* **Enhanced Data Ingestion & Indexing**: Explore more sophisticated data structures for improved indexing and retrieval, and expand beyond a CSV format to include additional data sources (_e.g._, Flare’s GitHub, blogs, documentation). BigQuery integration would be desirable.
74+
* **Intelligent Query & Data Processing**: Use recommended AI models to refine the data processing pipeline, including pre-processing steps that optimize and clean incoming data, ensuring higher-quality context retrieval. (_e.g._ Use an LLM to reformulate or expand user queries before passing them to the retriever, improving the precision and recall of the semantic search.)
75+
* **Advanced Context Management**: Develop an intelligent context management system that:
76+
* Implements Dynamic Relevance Scoring to rank documents by their contextual importance.
77+
* Optimizes the Context Window to balance the amount of information sent to LLMs.
78+
* Includes Source Verification Mechanisms to assess and validate the reliability of the data sources.
79+
* **Improved Retrieval & Response Pipelines**: Integrate hybrid search techniques (combining semantic and keyword-based methods) for better retrieval, and implement completion checks to verify that the responder’s output is complete and accurate (potentially allow an iterative feedback loop for refining the final answer).

0 commit comments

Comments
 (0)