{"id":23739728,"url":"https://github.com/piyush-linux/llamaindex-rag-1","last_synced_at":"2026-05-03T12:31:38.728Z","repository":{"id":269389174,"uuid":"907260363","full_name":"Piyush-linux/llamaindex-rag-1","owner":"Piyush-linux","description":"This project demonstrates how to create and interact with a query engine using LlamaIndex.","archived":false,"fork":false,"pushed_at":"2024-12-23T07:38:59.000Z","size":2521,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-31T09:38:19.468Z","etag":null,"topics":["ai","llama-index","llama-projects","llamaindex","llamaindex-rag","openai","python3","vector"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Piyush-linux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-23T07:29:52.000Z","updated_at":"2024-12-23T08:53:52.000Z","dependencies_parsed_at":"2024-12-23T08:39:26.540Z","dependency_job_id":null,"html_url":"https://github.com/Piyush-linux/llamaindex-rag-1","commit_stats":null,"previous_names":["piyush-linux/llamaindex-rag-1"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piyush-linux%2Fllamaindex-rag-1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piyush-linux%2Fllamaindex-rag-1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piyush-linux%2Fllamaindex-rag-1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piyush-linux%2Fllamaindex-rag-1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Piyush-linux","download_url":"https://codeload.github.com/Piyush-linux/llamaindex-rag-1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239880815,"owners_count":19712475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","llama-index","llama-projects","llamaindex","llamaindex-rag","openai","python3","vector"],"created_at":"2024-12-31T09:38:30.050Z","updated_at":"2026-05-03T12:31:33.684Z","avatar_url":"https://github.com/Piyush-linux.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌟 LlamaIndex Query Engine 🌟\n\nWelcome to the **LlamaIndex Query Engine** project! 🚀  \nThis project demonstrates how to create and interact with a **query engine** using `LlamaIndex`. It builds an index from documents stored in a specified directory and allows you to query the indexed data. If the index already exists, it loads the index from persistent storage, ensuring fast and efficient retrieval.\n\n---\n\n## 🚀 Features\n\n- 📄 **Document Indexing**: Loads documents from a specified directory and creates an index.\n- 💾 **Persistent Storage**: Saves the index to disk for later use, avoiding unnecessary re-building.\n- 🔍 **Query Engine**: After building or loading the index, you can perform queries with natural language.\n- 🔧 **Customizable**: Easily adapt the project for different datasets and query requirements.\n\n---\n\n## 📋 Requirements\n\nBefore you get started, make sure you have the following:\n\n- 🐍 **Python 3.x**: Make sure you have Python 3 installed.\n- 🍃 **Conda**: We use Conda environments to manage dependencies.\n- 📦 **`llama_index`**: This package is used for indexing and querying data.\n\n---\n\n## ⚙️ Setup\n\n### 0. Scratch\n```bash\nconda create -p venv python==3.12 -y\nconda activate ./venv \npip install -r requirements.txt\n\n\npip install ipykernel\n```\n\n### 1. Clone the repository\n\nStart by cloning the project to your local machine:\n\n```bash\ngit clone https://github.com/your-username/llamaindex-project.git\ncd llamaindex-project\n```\n\n### 2. Create a Conda environment\n\nTo create a Conda environment and install the necessary dependencies, run:\n\n```bash\nconda env create -f environment.yml\n```\n\nThis will create a new environment with all the required packages, including `llama_index`.\n\n### 3. Activate the Conda environment\n\nOnce the environment is created, activate it using:\n\n```bash\nconda activate llamaindex-env\n```\n\n### 4. Install additional dependencies (if any)\n\nIf there are any extra dependencies, you can install them using:\n\n```bash\npip install -r requirements.txt\n```\n\nThis will install any missing packages that are required.\n\n---\n\n## 🏃‍♂️ Usage\n\n### 1. Prepare your data\n\nPlace your documents in the `data` folder. The `SimpleDirectoryReader` will automatically load all documents from this directory to build the index.\n\n### 2. Running the script\n\nOnce your data is prepared, run the script to either **create** or **load** the index, and then **perform a query**.\n\n```bash\npython main.py\n```\n\n### 3. Code Breakdown\n\n\n- **Storage Check**: First, the script checks if the index already exists in the `./storage` directory.\n- **Create or Load Index**: If the index doesn't exist, it loads documents from the `data` folder and creates a new index. If the index exists, it loads it from storage.\n- **Querying**: Once the index is created or loaded, you can perform queries like `\"list some essentials topics we learn?\"`.\n\n---\n\n## 📂 Directory Structure\n\nHere’s an overview of the project structure:\n\n```\n/llamaindex-project\n│\n├── /data                 # Folder for storing your documents to index\n├── /storage              # Directory for storing the index\n├── main.py               # Main Python script for indexing and querying\n├── environment.yml       # Conda environment configuration\n├── requirements.txt      # List of additional Python dependencies\n└── README.md             # This file\n```\n\n---\n\n## ❓ Troubleshooting\n\n- **API Key Issues**: If you encounter issues with API keys (e.g., for OpenAI), ensure that your keys are correctly set in the `.env` file or environment variables.\n- **Missing Dependencies**: Make sure the Conda environment is activated and all required dependencies are installed.\n\n---\n\n## 📝 License\n\nThis project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for more details.\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Feel free to fork the repository, make changes, and open pull requests. If you have suggestions or encounter issues, please open an issue in the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyush-linux%2Fllamaindex-rag-1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiyush-linux%2Fllamaindex-rag-1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyush-linux%2Fllamaindex-rag-1/lists"}