Skip to main content
Agno’s defaults work well for most use cases. But if you’re seeing slow searches, memory issues, or poor results, a few strategic changes might help.

Quick Wins

1. Choose the Right Vector Database

Database choice has the biggest impact at scale:
DatabaseUse Case
LanceDB/ChromaDBDevelopment, testing (zero setup)
PgVectorProduction up to 1M docs, need SQL
PineconeManaged service, auto-scaling

2. Skip Already-Processed Files

The biggest speed-up when re-running ingestion:

3. Use Metadata Filters

Narrow searches before search:

4. Match Chunking to Content

StrategySpeedQualityBest For
Fixed SizeFastGoodUniform content
SemanticSlowerBestComplex documents
RecursiveFastGoodStructured docs

5. Use Async for Batch Operations

Process multiple sources concurrently:

Common Issues

Irrelevant Search Results

Causes: Chunks too large/small, wrong chunking strategy. Fixes:
  • Try semantic chunking for better context
  • Increase max_results to check if relevant results are ranked lower
  • Add metadata filters to narrow scope

Slow Content Loading

Causes: Reprocessing existing files, semantic chunking on large datasets. Fixes:
  • Use skip_if_exists=True
  • Switch to fixed-size chunking
  • Process in batches

Memory Issues

Causes: Loading too many large files at once, chunk sizes too large. Fixes:
  • Process in smaller batches
  • Reduce chunk size
  • Use include/exclude patterns
  • Clear outdated content with knowledge.remove_content_by_id(content_id)

Advanced Optimizations

Combine vector and keyword search:

Reranking

Improve result ordering:

Smaller Embedding Dimensions

Trade slight quality for faster search:

Monitoring

Next Steps

Chunking

How chunking affects performance

Vector DB

Compare database options

Hybrid Search

Combine vector and keyword search

Embedders

Choose the right embedder