Skip to content

Commit

Permalink
Merge pull request #273 from akashAD98/rag/farmergpt
Browse files Browse the repository at this point in the history
example: rag/farmerGPT
  • Loading branch information
PrashantDixit0 authored Dec 21, 2024
2 parents 49defe3 + d45bfc8 commit 64bd1bb
Show file tree
Hide file tree
Showing 6 changed files with 827 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Develop a Retrieval-Augmented Generation (RAG) application using LanceDB for eff
| RAG    | Interactive Notebook & Scripts | Blog |
| --------- | -------------------------- | ----------- |
||||
| [RAG On PDF](/examples/RAG-On-PDF/) | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/RAG-On-PDF/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> [![LLM](https://img.shields.io/badge/local-llm-green)](#) [![beginner](https://img.shields.io/badge/beginner-B5FF33)](#)|
| [RAG with Contextual Retrieval and Hybrid search](./examples/Contextual-RAG/) | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Contextual-RAG/Anthropic_Contextual_RAG.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> [![LLM](https://img.shields.io/badge/openai-api-white)](#) [![intermediate](https://img.shields.io/badge/intermediate-FFDA33)](#)| [![Ghost](https://img.shields.io/badge/ghost-000?style=for-the-badge&logo=ghost&logoColor=%23F7DF1E)](https://blog.lancedb.com/guide-to-use-contextual-retrieval-and-prompt-caching-with-lancedb/) |
| [RAG with Matryoshka Embeddings and LlamaIndex](./tutorials/RAG-with_MatryoshkaEmbed-Llamaindex/) | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/tutorials/RAG-with_MatryoshkaEmbed-Llamaindex/RAG_with_MatryoshkaEmbedding_and_Llamaindex.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> [![LLM](https://img.shields.io/badge/openai-api-white)](#) [![intermediate](https://img.shields.io/badge/intermediate-FFDA33)](#)||
| [RAG with IBM Watsonx](./examples/RAG-with-watsonx/) | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/RAG-with-watsonx/Watsonx_example.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> [![LLM](https://img.shields.io/badge/openai-api-white)](#) [![watsonx LLM](https://img.shields.io/badge/watsonx-api-lightblue)](#) [![beginner](https://img.shields.io/badge/beginner-B5FF33)](#)||
Expand Down
Binary file added assets/RAG_PDF_FarmerQA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
1 change: 1 addition & 0 deletions examples/RAG-On-PDF/Dataset/info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Data is collected from open search.
45 changes: 45 additions & 0 deletions examples/RAG-On-PDF/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# FarmerGPT: RAG with PDF for Farmer Data

![image](../../assets/RAG_PDF_FarmerQA.png)

This project demonstrates how to build a Retrieval-Augmented Generation (RAG) application using farmer-specific data. The data is extracted from a PDF containing crop variety information for sugarcane, turmeric, bamboo, cashew nuts, and more. The application leverages **LangChain** and **LanceDB** to create a customizable and extensible FarmerGPT solution.

---

## Features

- **Customizable Prompts**: Easily adapt prompts to suit specific queries and use cases.
- **Memory Support**: Incorporates memory capabilities to retain context during interactions.
- **PDF Integration**: Processes and retrieves data from the provided PDF file.

---

## How to Use

. **Use the Colab Notebook**:
- To try FarmerGPT directly without setup, use the provided Google Colab notebook: <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/RAG-On-PDF
/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
- Open the notebook, follow the instructions, and run the cells to interact with the application.
---

## Key Technologies

- **LangChain**: Framework for building applications powered by large language models.
- **LanceDB**: Vector database used for efficient document retrieval.
---

## Sample Use Cases

- Assisting farmers with queries about crop varieties.
- Providing tailored advice based on specific crop information.
- Serving as a reference for agricultural experts and enthusiasts.
---

## Customization

You can build upon this template to include:
- Additional crop varieties.
- New functionalities such as integration with IoT devices.
- Multi-language support for wider accessibility.

---
Loading

0 comments on commit 64bd1bb

Please sign in to comment.