Agentic AI solution

for Contextual Targeting
Case Study
08.05.2026

Written by
Tanya Anoykina

As the advertising industry moves toward privacy-first technologies and reduced reliance on third-party cookies, contextual targeting has become an essential capability for modern DSP platforms. Our client, a media buying agency operating a custom DSP platform developed by Asteriosoft, aimed to enhance its programmatic capabilities with AI-driven contextual targeting. The primary goal of the project was to integrate contextual targeting into the platform, enabling more accurate, privacy-focused, and scalable advertising targeting within their programmatic ecosystem.

Challenge of the project:
Create money efficient contextual targeting suitable for high load DSP platforms. We needed to take into consideration:
  • multilingual content,
  • dynamic news environments,
  • brand safety requirements,
  • compatibility with real-time bidding.

Custom Agentic AI Solution

We evaluated 2 architectural approaches for building the Contextual Targeting AI solution. The first option was hosting and managing open source AI models on dedicated infrastructure, which required significant GPU resources, continuous maintenance and DevOps support. The second option was an agentic AI architecture, where intelligent agents dynamically use an external AI model and integrate via API.

We chose the agentic approach because it was more economically efficient, easier to scale, and faster to evolve. Instead of investing in permanent infrastructure, we built a flexible system that optimizes costs and allows the client to scale spending gradually as the platform grows.

The solution was not to analyze URLs in real time because real-time page processing during ad requests is too slow for OpenRTB auctions. In RTB systems, decisions must happen within milliseconds, while deep AI analysis of a webpage can take longer time and/or consume costly compute resources.

Instead, we use a different approach: URLs are analyzed after it was first received during the auction, then stored at Aerosike, and then the system serves ready-to-use classifications during auctions. As Aeroskie is one of the fastest databases this dramatically reduces latency, lowers infrastructure costs, and makes the platform commercially viable for high-volume traffic.

We built an Agentic AI architecture integrating DeepSeek as the reasoning engine for contextual understanding and analysis.We conducted comparative testing with several leading AI models and found that DeepSeek delivered a similar level of contextual analysis quality and semantic accuracy. At the same time the cost of DeepSeek tokens is approximately 10–100 times lower than that of leading AI models, making it significantly more cost-efficient for large-scale production environments.

Core Capabilities of the Contextual Targeting Agentic AI Solution

The AI model analyzes:
  • Separates the main content of a web page from secondary elements such as announcements and advertising;
  • Identifies the article’s meaning and main topic;
  • Extracts keywords and translates them into English;
  • Evaluates brand safety and detects potentially risky or sensitive content.
Instead of simple keyword matching, the system understands contextual relevance.

Real-Time Auctions Pipeline
The architecture supports high-load environments, processes web pages in parallel, and enables contextual targeting within real-time bidding (RTB) auctions.

Denis Anoykin, Software Architect at Asteriosoft:

The architectural decision was primarily driven by economic efficiency. We calculated and compared the costs of both approaches and concluded that an agentic AI architecture is more attractive for an operating DSP platform because it significantly reduces the cost of running large models continuously on dedicated servers. Instead of maintaining expensive GPU infrastructure, managing scaling capacity, handling idle resources, and covering ongoing DevOps expenses, an agentic system can call the appropriate model only when needed.
This makes the platform more commercially viable, as infrastructure costs grow alongside actual usage rather than being tied to permanently reserved computing resources.
White-label supply side platform

Agentic AI Solution Architecture

The solution was built as an agentic AI module that combines DeepSeek LLM integration, Java-based AI orchestration, real-time API services, Aerospike storage, and a distributed backend infrastructure. DeepSeek is used for deeper content understanding, including topic detection, keyword extraction, brand safety analysis, and multilanguage translation.

Aerospike storage is used to keep processed URL profiles: contextual categories, keywords, and brand safety signals. This allows the DSP to access ready-to-use targeting data during real-time bidding without performing AI analysis inside the auction flow.
The distributed backend and high-load event processing architecture enable parallel URL processing, scalable data updates, and fast access to contextual signals for programmatic campaigns.

Technology Stack:
  • DeepSeek LLM integration
  • Real-time API services
  • Java-based AI orchestration
  • Aerospike storage
  • Distributed backend infrastructure
  • High-load event processing architecture

Security and Data Privacy of AI agentic solution

Security and data privacy were important considerations in the architecture design. DeepSeek is used only for contextual page analysis and keyword generation. To generate contextual keywords, the system sends only the public page URL to the DeepSeek API and does not use internal platform data within LLM requests.

The solution does not send or expose any personal data, user identifiers, cookies, IP addresses, campaign data, or business information to the AI model. As a result, the LLM does not have access to DSP users, advertiser data, or internal platform infrastructure.

API key management provides additional security controls, including access limitations, request activity monitoring, and the ability to disable or rotate API keys at any time.

Results of the Project

After deploying the contextual targeting module, the DSP platform achieved measurable improvements in targeting performance, increasing campaign CTR by up to 50%.

Conclusion

Our Agentic AI contextual targeting solution demonstrates how large language models and autonomous AI agents can transform AdTech infrastructure.
The combination of DeepSeek semantic intelligence, agent-based orchestration, and real-time processing creates a contextual targeting engine for modern programmatic advertising environments.
Read also