Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

LlamaIndex RAG POC

A Retrieval-Augmented Generation (RAG) console app built with LlamaIndex and OpenAI.

Project Layout

LlamaIndex/
├── .venv/               ← managed by uv (Python 3.10)
├── data/
│   └── sample.txt       ← drop your documents here (.txt, .pdf, .docx, …)
├── .env.example         ← copy to .env and add your OpenAI key
├── main.py              ← the RAG console app
└── pyproject.toml

How It Works

  1. First run — reads all files in data/, chunks + embeds them (OpenAI text-embedding-3-small), stores the index in .index_store/
  2. Subsequent runs — loads the persisted index (no re-embedding cost)
  3. Chat loop — uses condense_plus_context mode: condenses follow-up questions into standalone queries, retrieves top-3 chunks, passes context to gpt-4o-mini

Setup & Usage

# 1. Add your OpenAI key
cp .env.example .env   # then edit .env

# 2. Add your own docs to data/ (optional — sample.txt is included)

# 3. Run
.venv/Scripts/python main.py

Console Commands

Input Action
any text Ask a question
clear Reset conversation history
quit / exit Exit the app

To add more documents, drop files into data/ and delete .index_store/ to trigger a re-index.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages