Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example Project for Retrieval Augmented Generation (RAG)

en zh-TW

This is an example application to demenstrate Retrieval Augmented Generation (RAG) in Traditional Chinese.

We used FastAPI as the interface, LangChain as the application framework, and OpenAI-API as the LLM and embedding model provider. That is to say, you will need a valid OPENAI-API-KEY to run this example on its default settings. You can modify the code to use alternative models.

To avoid copyright issues, this demo provided RAG of the Bible. The 《國語和合本聖經》 is a translation of the English Revised Version of the Bible published in 1919 and is currently belong to the public domain.

Getting Started

  1. Clone this repo
git clone https://github.com/tingsyo/example_rag.git
  1. Install dependecies
pip install -r requirements.txt
  1. Run the app

Use the Bible for RAG by default:

python app.py

Or, you may specify your own vectorstore:

python app.py --vectorstore_path <PATH_TO_VECTORSTORE>

Create vectorstore from self-owned data

We also provide an example script to convert all pdf files in the specified directory into a vectorstore. Usage:

python create_vectorstore_from_pdfs.py --data_path <PATH_TO_PDF_FILES> --output_path  <PATH_TO_OUTPUT_VECTORSTORE>

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages