Skip to content

vikyw89/llama-index-playground

Repository files navigation

LlamaIndex Playground

A playground repository for experimenting with LlamaIndex, a powerful framework for building context-augmented LLM applications.

Overview

This repository contains various examples and experiments with LlamaIndex features:

  • Semantic Search (semantic_search/) - Vector store indexing for efficient similarity search
  • Summarization (summarization/) - Document summarization using SummaryIndex
  • Structured Data Queries (query_structured_data/) - Natural language queries to SQL databases
  • Context-Augmented Agents (context_augmentation/) - Query engines with context retrieval over financial documents (Uber 10Q filings)
  • RAG Agents (rag_agent/) - Retrieval-augmented generation with custom function tools
  • Notebooks (notebook/) - Jupyter notebooks with LATS and DAG agent implementations

Features

  • Vector store indexing and retrieval
  • Document summarization with tree-summarize mode
  • SQL database querying via natural language
  • Multi-document context augmentation
  • Custom tool-augmented agents
  • Async agent streaming support

Setup

  1. Clone the repository
  2. Install dependencies with Poetry:
    poetry install
  3. Copy .env.example to .env and add your OpenAI API key:
    cp .env.example .env
    # Edit .env and add: OPENAI_API_KEY=your_key_here

Usage

Each module can be run independently. For example:

# Semantic search
python -m semantic_search

# Summarization
python -m summarization

# Query structured data
python -m query_structured_data

# Context-augmented agent
python -m context_augmentation

Key Findings

  • Semantic search is fast and efficient - pre-indexing and storing vectors enables faster retrieval and cheaper operations
  • Summarization requires more processing time due to the tree-summarize approach

Dependencies

  • Python 3.12+
  • LlamaIndex 0.10.39+
  • llama-index-agent-openai
  • llama-index-llms-openai
  • python-dotenv

License

MIT

Releases

No releases published

Packages

 
 
 

Contributors