knowledge-base-injection

Installation
SKILL.md

Knowledge Base Injection

Part of Agent Skills™ by googleadsagent.ai™

Description

Knowledge Base Injection is the technique of dynamically injecting domain expertise into an agent's context at the moment it is most relevant, using TF-IDF pattern matching and semantic scoring. Generic language models lack the deep domain knowledge required for specialized tasks like Google Ads optimization, medical coding, or financial compliance. Rather than fine-tuning (expensive, slow, brittle) or bloating system prompts with everything the model might need (wasteful, dilutes attention), Knowledge Base Injection retrieves and injects only the specific patterns relevant to the current task.

This skill is built on the production knowledge base system powering Buddy™ at googleadsagent.ai™, specifically the gads-knowledge.js module containing over 1,000 curated Google Ads optimization patterns. Each pattern includes a trigger condition (when to apply it), a recommendation (what to do), evidence (why it works), and a confidence score. When Buddy™ analyzes a campaign, the knowledge base engine scores all patterns against the current context using TF-IDF and injects the top-K most relevant patterns into the agent's context, transforming a general-purpose model into a domain expert.

The injection system operates on a retrieval-augmented generation (RAG) paradigm, but with a critical distinction: rather than retrieving raw documents, it retrieves structured action patterns with built-in confidence scores and applicability conditions. This produces more actionable, more reliable agent outputs than document-level RAG.

Use When

  • The agent needs domain expertise that general-purpose models lack
  • You have a curated knowledge base of patterns, rules, or best practices
  • Fine-tuning is too expensive, too slow, or creates model version lock-in
  • Different queries require different subsets of domain knowledge
  • You want to update the agent's expertise without retraining or redeploying
Related skills
Installs
9
GitHub Stars
7
First Seen
Apr 12, 2026