Files
langchain-hn-rag/README.md
2025-07-01 13:32:18 +02:00

970 B

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 key for text extraction.
    • SLACK_BOT_TOKEN: Your Slack bot token for sending messages (optional).
  2. Start local Weaviate vector store instance:

    docker compose up -d
    
  3. Run the RAG application:

    uv run python indexing.py
    

Adjust the constants in indexing.py to configure the behavior of the application. You can optionally enable MLflow tracing by setting ENABLE_MLFLOW_TRACING=True there (make sure to run mlflow server first).