import { Agent, createPineconeStore } from 'praisonai-ts';
const vectorStore = await createPineconeStore({
apiKey: process.env.PINECONE_API_KEY!,
index: 'my-knowledge-base',
namespace: 'docs',
});
const agent = new Agent({
name: 'RAGAgent',
instructions: 'You are a helpful assistant with access to a knowledge base.',
knowledge: vectorStore,
ragConfig: {
topK: 5, // Number of results to retrieve
minScore: 0.7, // Minimum similarity score
includeMetadata: true, // Include document metadata
rerank: true, // Enable reranking
citationFormat: 'inline', // Citation format: inline, footnote, none
},
});