BrightQuery

Factual Shield

What is a Factual Shield?

Intelligent research agent usingMeta’s Llama Stack demonstrating the path to factual business and people intelligence by combining structured corporate and people data from BrightQuery with real-time open web search for enterprise decision-making.

Example queries
  • What business ventures has John Smith of Los Angeles been involved in and do they have ties to entities in China?
  • Who are the largest employers in Michigan providing auto parts?
  • List the fastest growing dentist practices in the last 5 years in Vietnam.
  • Are the investors of ABC PLC based in London linked to XYZ SA based in Switzerland?
How Factual Shield Adds Value to User

Analysts get instant, factual answers with provenance

Auditable
  • All claims backed by verifiable data sources with source linkages and confidence scores.
Comprehensive
  • Real-time web intelligence supplements the BQ database iteratively to triangulate toward the truth.
Efficient
  • Eliminates hours of manual research and record matching while accessing proprietary BQ data.
Entity resolved
  • Entities referenced (people, companies, etc.) are linked to specific BrightQuery IDs to avoid ambiguity.
Explainable
  • Clear reasoning chain through an 8-stage research pipeline.
Maintainable
  • Explicit workflow logic vs. implicit agent behavior.
Implementation features
  • Factual Shield does programmatic LLM interaction with tool calling
  • 8-stage structured pipeline with explicit orchestration
  • Each stage combines reasoning, tool execution, and context management
  • Each stage has LLM reasoning + tool execution + context management
  • Factual Shield has deterministic workflow execution
What It Provides
  • Predictable behavior for business and people intelligence
  • Fine-grained control over each reasoning step
  • Each stage combines reasoning, tool execution, and context management
  • Significant token reduction (up to 100x) through explicit orchestration and context management
Pipeline Stages
Pipeline Stages
Multi-Provider Support
  • Works regardless of LLM provider: utilize ChatGPT, Claude, Gemini, etc.
  • Currently: Claude 3.7 Sonnet via Anthropic API
  • Configuration-based model selection
Why It Matters
  • Future-proof: Can switch to other models for different stages (e.g. Llama 3.2 Instruct + Llama 4)
  • Cost optimization: Right sized the models (opportunity to fine tune model for special purpose)
  • Risk mitigation: Not locked to single provider
TECHNICAL ARCHITECTURE
Meta Llama Guard 3 for Safety
  • Input safety: Block harmful user queries
  • Output safety: Ensure appropriate responses
  • Hybrid: Llama 3.3 (main) + Llama Guard (safety)
  • Remote execution via Ollama or Cloud providers
Why It Matters
  • Enterprise safety requirements for production
  • Protect against misuse (hate speech, privacy)
  • Compliance with corporate AI usage policies
Technical Architecture
Meta Llama Guard (Input + Output Safety)
  • Screens user queries (input) and LLM responses (output) for harmful content and prompt injection.
Pipeline Monitoring (Algorithmic)
  • Monitor data quality and detect anomalies throughout 8-stage pipeline execution.
BQ Factual Accuracy Shield
  • Fact-check entities against BQ ground truth; eliminates hallucinations.
User Interface
Pipeline Stages