- clarifai
- rag-template
rag-agent-claude2-1-naive
RAG Agent uses Claude 2.1 LLM model with a simple prompt for straightforward integration.
Overview
No input available.
Notes
RAG Agent
This RAG Agent uses Claude 2.1 LLM model with a simple prompt for straightforward integration.
How to Use this RAG Agent?
Using Clarifai SDK
Export your PAT as an environment variable. Then, import and initialize the API Client.
Find your PAT in your security settings.
export CLARIFAI_PAT={your personal access token}
Upload your Data
Upload you data in the Clarifai App to chat with RAG Agent.
from clarifai.rag import RAG
rag_agent = RAG.setup(
app_url= "https://clarifai.com/clarifai/rag-template",)
rag_agent.upload(folder_path = "/app/files", chunk_size= 512, chunk_overlap= 50)
folder_path Folder path to the documents.
chunk_size: Chunk size for splitting the document.
chunk_overlap: The token overlap of each chunk when splitting.
Chat with the your Data using RAG Agent
from clarifai.rag import RAG
rag_agent = RAG(workflow_url='https://clarifai.com/clarifai/rag-template/workflows/rag-agent-claude2-1-naive')
rag_agent.chat(messages=[{"role":"human", "content":"What is Clarifai"}])
Using Workflow
To utilize RAG Agents, you can input a query through the Blue Plus Try your own Input button. This incorporates all the documents in the Inputs as external data in RAG.
- Workflow IDrag-agent-claude2-1-naive
- DescriptionRAG Agent uses Claude 2.1 LLM model with a simple prompt for straightforward integration.
- Last UpdatedMar 18, 2024
- PrivacyPUBLIC
- Share