Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐶 Dog Love - Wikipedia RAG

Dog Love is a Retrieval-Augmented Generation (RAG) application built with Streamlit, LlamaIndex, and OpenAI. It retrieves information about popular dog breeds from Wikipedia, creates a searchable vector index, and answers user questions using an LLM.

Features

  • Ask natural language questions about dog breeds.
  • Retrieves relevant information from Wikipedia.
  • Uses vector embeddings for semantic search.
  • Generates accurate, context-aware responses with OpenAI.
  • Displays the retrieved context used to answer each question.
  • Automatically caches the index for faster subsequent runs.

Technologies Used

  • Python
  • Streamlit
  • LlamaIndex
  • OpenAI API
  • Wikipedia API
  • python-dotenv

Dog Breeds Included

  • Labrador Retriever
  • Golden Retriever
  • Afghan Hound
  • Australian Cattle Dog
  • Beagle
  • Border Collie
  • Chihuahua
  • Dachshund
  • Dobermann
  • German Shepherd
  • Indian Pariah Dog
  • Siberian Husky

Installation

  1. Clone the repository.

  2. Install dependencies:

pip install -r requirements.txt
  1. Create a .env file in the project directory:
OPENAI_API_KEY=your_api_key_here
  1. Run the application:
streamlit run main.py

Project Structure

.
├── main.py
├── .env
├── wiki_rag/
└── README.md

How It Works

  1. Downloads Wikipedia articles for selected dog breeds.
  2. Converts the articles into documents.
  3. Creates vector embeddings and stores them locally.
  4. Retrieves the most relevant documents for a user's question.
  5. Uses an OpenAI language model to generate an answer from the retrieved context.

Future Improvements

  • Add support for more dog breeds.
  • Include breed images.
  • Filter results by breed.
  • Allow users to select different language models.
  • Support additional knowledge sources beyond Wikipedia.

License

This project is intended for educational and learning purposes.

About

A Streamlit-based Retrieval-Augmented Generation (RAG) application that answers questions about different dog breeds using Wikipedia as the knowledge source. The app retrieves relevant information with LlamaIndex and generates natural language responses using OpenAI models.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages