Building a Travel AI Agent With Agno and Qdrant (Phidata's Successor)
说明与用途
使用 Agno 和 Qdrant 构建旅行代理:修复过时的导入,使用工具调用实时价格,采用章节分块和元数据提升检索质量,达到 96% 的价格准确率和 5.2 秒的平均响应时间。
问题
Phidata tutorials from 2024 no longer install because the package became Agno in 2025 and imports changed, causing confusion for developers building travel agents.
结果
The revised stack delivers 100% real hotel IDs, 96% price accuracy, 83% relevant retrieval chunks, and a median response time of 5.2s, with fewer corrections needed.
工作流
- 1. Set up Qdrant collection "travel-notes" with OpenAI embeddings.
- 2. Chunk documents by section, include heading, and add metadata fields city and doc_type.
- 3. Configure Agno Agent with OpenAIChat model gpt-5 and tools search_hotels, hotel_detail, search_notes.
- 4. Add instruction lines to enforce factual answers, single question on missing fields, and quote prices with date.
- 5. Use MCP server configuration for searchHotels, getHotelDetail, getHotelSearchTags tools.
- 6. Merge facts from vector and tool results, attaching prose only when hotel_id matches.
- 7. Measure metrics: 100% real hotel ID, 96% price accuracy, 83% relevant chunks, 0.4 corrections, 5.2s median response.
证据
Phidata became Agno in 2025, the imports moved, and half the travel-agent examples floating around still use the old names.
The mistake I made twice: putting live prices in the vector store. Embeddings are snapshots. A price embedded last Tuesday is a wrong price with confident retrieval.
Chunking is where retrieval quality is won. I split by section, not by token count, and I keep the heading in every chunk.
Three instruction lines, and the third one does more work than it looks like. "Quote the date they were checked" makes stale data visible.
Only attach prose from the vector store when it is keyed to the same hotel ID that came back from the tool.
- 记录日期: 2026-11-03T18:14:11.187Z