Skip to content
/ rag Public
forked from njhale/rag

Retrieval-Augmented Generation for GPTScript

License

Notifications You must be signed in to change notification settings

sangee2004/rag

 
 

Repository files navigation

RAG

Retrieval-Augmented Generation for GPTScript. Leveraging an embedding model and a generation model behind OpenAI API, the RAG tool can answer prompts based on provided documents. There is an adhoc mode where nothing is persisted and we're using an in-memory vector database, so the embeddings don't persist between runs.

Preqrequisites

  • Python 3.10+
  • OpenAI API Key - exported as OPENAI_API_KEY environment variable

Usage

gptscript tool.gpt --prompt "<your question>" --inputs "<your documents>"`

CLI Arguments

  • --prompt - The prompt to ask the model
  • --inputs - The documents to use for retrieval: comma-separated list of files or directories

Examples

Check this README file and ask about the CLI options for the RAG tool

gptscript tool.gpt --prompt "What are the CLI options for the RAG tool?" --inputs "README.md"

is the same as

gptscript examples/readme.gpt

About

Retrieval-Augmented Generation for GPTScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%