Skip to content

A simple RAG chatbot template for starting a new LLM application

Notifications You must be signed in to change notification settings

jakenolan/llamaindex-rag-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

LlamaIndex RAG Template


A simple RAG chatbot template for starting a new LLM application in 50 lines of code. This template makes use of LlamaIndex and OpenAI. Specifically, this template is made using ReActAgent from LlamaIndex, which is an agent that you can create custom tools for to query or manipulate your data.


Template Changes


First, fill the empty string below with your API key

openai.api_key = ""

Next, replace all occurences of <topic> with whatever topic your application is about. See lines below.

...
[31] name="<topic>_data",
[32] description="Provides information about <topic>. Use a detailed plain text question as input to the tool."
...

...
[37] context = """\
[38] You are an expert in all information that has to do with <topic>. \
[39] You will answer questions about <topic> as in the persona of a very knowledgeable expert. \
[40] """
...

About

A simple RAG chatbot template for starting a new LLM application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages