Mastering Deep Seek: Hacks for Agent Integration with Pantic AI

- Authors
- Published on
- Published on
In this episode, the team delves into the intricate world of Deep seek, a powerful model designed for structured responses. They confront the challenges posed by the model's lack of support for function calling and JSON output, crucial components in the realm of agent-building. Through ingenious hacks, they showcase how to maneuver around these obstacles and seamlessly integrate Deep seek into agents using the versatile Pantic AI platform. The team sheds light on the similar hurdles faced by the Gemini 2.0 thinking models, hinting at a shared journey towards enhanced functionality.
Venturing deeper into the intricacies of structured responses, the team unveils Deep seek's own insights on the matter, emphasizing the significance of prompt engineering and API configuration. By demonstrating a practical method to leverage Pantic AI with Deep seek, they provide a roadmap for obtaining structured outputs efficiently. By setting up the Deep seek API within the Pantic AI framework, they demonstrate the flexibility of switching between models to tailor responses to specific tasks, showcasing the adaptability and power of these cutting-edge technologies.
The team's hands-on approach involves utilizing the Deep seek chat model for a search agent, while grappling with the limitations of the Deep seek R1 reasoning model in handling function calling. To overcome this hurdle, they ingeniously employ a simpler model for formatting structured outputs, ensuring a smooth flow of information. Emphasizing the importance of capturing both content and reasoning content from Deep seek R1's responses, they delve into the intricacies of the model's output structure, highlighting the need for a comprehensive understanding of the reasoning chain of thought.
In a captivating twist, the team navigates through the nuances of multi-round conversations, underlining the strategic storage and utilization of the Chain of Thought for optimal results. By showcasing a method to extract both content and reasoning content from Deep seek R1's responses using a standard OpenAI call, they demonstrate a blend of innovation and practicality in harnessing the full potential of this groundbreaking technology.

Image copyright Youtube

Image copyright Youtube

Image copyright Youtube

Image copyright Youtube
Watch DeepSeek R1 for Structured Agents on Youtube
Viewer Reactions for DeepSeek R1 for Structured Agents
Using a reasoning model as a tool for various processes
Combining with Gemini Flash for cleaning output
Concerns about effort and potential obsolescence of techniques
Mention of potential new models like o3 and Opus
Converting JSON output to XML
Building an MCP server with reasoning tools
Appreciation for providing Hindi track
Mention of trying Kimi 1.5
Using models for cybersecurity and penetration testing
Comparison between DeepSeek and OpenAI search
Related Articles

Unveiling Gemini 2.5 TTS: Mastering Single and Multi-Speaker Audio Generation
Discover the groundbreaking Gemini 2.5 TTS model unveiled at Google IO, offering single and multi-speaker text to speech capabilities. Control speech style, experiment with different voices, and craft engaging audio experiences with Gemini's native audio out feature.

Google IO 2025: Innovations in Models and Content Creation
Google IO 2025 showcased continuous model releases, including 2.5 Flash and Gemini Diffusion. The event introduced Image Gen 4 and VO3 video models in the innovative product Flow, revolutionizing content creation and filmmaking. Gemini's integration of MCP and AI Studio refresh highlight Google's commitment to technological advancement and user empowerment.

Nvidia Parakeet: Lightning-Fast English Transcriptions for Precise Audio-to-Text Conversion
Explore the latest in speech-to-text technology with Nvidia's Parakeet model. This compact powerhouse offers lightning-fast and accurate English transcriptions, perfect for quick and precise audio-to-text conversion. Available for commercial use on Hugging Face, Parakeet is a game-changer in the world of transcription.

Optimizing AI Interactions: Gemini's Implicit Caching Guide
Gemini team introduces implicit caching, offering 75% token discount based on previous prompts. Learn how it optimizes AI interactions and saves costs effectively. Explore benefits, limitations, and future potential in this insightful guide.