You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Changelog
## New Features:
- **Cerebras Model Provider**: Added Cerebras as a model provider.
- **Claude Web Search**: Added support for [Claude’s new web search
tool](https://www.anthropic.com/news/web-search)
- **Knowledge Base Metadata Filtering (Beta)**: Added support for
filtering documents by metadata
- **Two Ways to Apply Filters**:
- **Explicit Filtering**: Pass filters directly to Agent or during
run/query
```python
# Option 1: Filters on Agent initialization
agent = Agent(
knowledge=knowledge_base,
knowledge_filters={"filter_1": "abc"}
)
# Option 2: Filters on run execution
agent.run("Tell me about...", knowledge_filters={"filter_1": "abc"})
```
See docs
[here](https://github.com/agno-agi/agno/blob/main/cookbook/agent_concepts/knowledge/filters/pdf/filtering.py)
- **Agentic Filtering**: Agent automatically detects and applies filters
from user queries
```python
# Enable automatic filter detection
agent = Agent(
knowledge=knowledge_base,
enable_agentic_knowledge_filters=True
)
# Agent extracts filters from query
agent.run("Tell me about John Doe's experience...")
```
See docs
[here](https://github.com/agno-agi/agno/blob/main/cookbook/agent_concepts/knowledge/filters/pdf/agentic_filtering.py)
- Two approaches for adding metadata to documents:
1. **During Knowledge Base Initialization**:
```python
knowledge_base = PDFKnowledgeBase(path=[
{
"path": "file_1.pdf",
"metadata": {
"user_id": "abc"
}
},
{
"path": "file_2.pdf",
"metadata": {
"user_id": "xyz"
}
}
])
```
2. **During Individual Document Loading:**
```python
knowledge_base.load_document(
path="file.pdf",
metadata={"user_id": "abc"}
)
```
- **Compatibility**
- **Knowledge Base Types**: `PDF`, `Text`, `DOCX`, `JSON`, and `PDF_URL`
- **Vector Databases**: `Qdrant`, `LanceDB`, and `MongoDB`
## Improvements:
- **User and Session ID in Tools**: Added `current_user_id` and
`current_session_id` as default variables in
## Bug Fixes:
- **Knowledge Base ID Clashes**: Knowledge files with overlapping
names (e.g., `abc.-.xyz.pdf` and `abc.-.def.pdf`)
were being incorrectly identified due to the readers using formatted
names as unique id which were getting uniqueness conflict. Introduced a
unique ID for each document in all the readers using `uuidv4()` to
ensure strict identification and prevent conflicts.
0 commit comments