Add readme

This commit is contained in:
Adrian Rumpold
2025-07-01 13:14:59 +02:00
parent b55fd6a021
commit b21c595a49
2 changed files with 39 additions and 8 deletions

View File

@@ -0,0 +1,26 @@
# LangChain RAG Demo
This repository demonstrates how to use LangChain for a Retrieval-Augmented Generation (RAG) application.
The code retrieves Hacker News front page stories, categorizes them, stores them in a vector store, and performs retrieval based on user preferences.
## Getting Started
1. Set the following environment variables:
- `OPENAI_API_KEY`: Your OpenAI API key for chat and embedding models.
- `JINA_AI_KEY`: Your [Jina AI Reader](https://jina.ai/reader/) key for text extraction.
2. Start local Weaviate vector store instance:
```bash
docker compose up -d
```
3. Run the RAG application:
```bash
uv run python indexing.py
```
Adjust the constants in `indexing.py` to change the number of stories to fetch and the categories to use.
You can optionally enable MLflow tracing by setting `ENABLE_MLFLOW_TRACING=True` there (make sure to run `mlflow server` first).