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

Exploring Google Cloud Next 2025: Unveiling the Agent-to-Agent Protocol
Sam Witteveen explores Google Cloud Next 2025's focus on agents, highlighting the new agent-to-agent protocol for seamless collaboration among digital entities. The blog discusses the protocol's features, potential impact, and the importance of feedback for further development.

Google Cloud Next Unveils Agent Developer Kit: Python Integration & Model Support
Explore Google's cutting-edge Agent Developer Kit at Google Cloud Next, featuring a multi-agent architecture, Python integration, and support for Gemini and OpenAI models. Stay tuned for in-depth insights from Sam Witteveen on this innovative framework.

Mastering Audio and Video Transcription: Gemini 2.5 Pro Tips
Explore how the channel demonstrates using Gemini 2.5 Pro for audio transcription and delves into video transcription, focusing on YouTube content. Learn about uploading video files, Google's YouTube URL upload feature, and extracting code visually from videos for efficient content extraction.

Unlocking Audio Excellence: Gemini 2.5 Transcription and Analysis
Explore the transformative power of Gemini 2.5 for audio tasks like transcription and diarization. Learn how this model generates 64,000 tokens, enabling 2 hours of audio transcripts. Witness the evolution of Gemini models and practical applications in audio analysis.