Skip to main content
This example demonstrates the core functionality of RAGLight: loading documents from a local folder, indexing them, and asking questions using a local LLM (Ollama).

Code Example

1

Setup Configuration

Import the necessary classes and set up logging to see the pipeline in action.
2

Define Knowledge Base

Point the pipeline to your data directory. RAGLight handles PDF and text files automatically.
3

Build & Query

The build() method processes documents and creates the vector store.
main.py