DBpedia Lookup for General Fact Evidence Enrichment

Motivation

The evidence pipeline (Phase 4b) currently relies on Wikipedia (text summaries) and Wikidata (sparse structured properties) for non-sports domains. Science, history, art, politics, film, and technology facts only get free-text evidence — the pipeline can't easily verify specific dates, awards, measurements, or attribution claims without parsing prose.

DBpedia extracts 3,000 structured properties from Wikipedia infoboxes into queryable JSON. It fills the gap between Wikipedia's text and Wikidata's sparse triples — providing richer structured data for the domains that lack dedicated APIs.

What It Adds

Claim TypeCurrent EvidenceWith DBpedia
"Einstein won the Nobel Prize in 1921"Wikipedia text mentions itdbo:awardYear = 1921 (structured)
"The Mona Lisa was painted c. 1503-1519"Wikipedia paragraphdbo:completionDate, dbo:author = Leonardo_da_Vinci
"Beethoven composed 9 symphonies"Wikipedia summarydbo:notableWork list, structured count
"Cleopatra died in 30 BCE"Wikidata P570dbo:deathDate = -0029-08-12 + dbo:deathCause

Implementation

Challenge 1: DBpedia Lookup Client

File: packages/ai/src/dbpedia-client.ts (new)

  • Endpoint: https://lookup.dbpedia.org/api/search?query={entity}&format=JSON
  • No auth required (free, public)
  • No rate limit documented (be respectful — add 100ms delay between calls)
  • In-memory cache: 24h TTL, 5K max entries (matches Wikidata pattern)
  • Metrics: dbpedia.api_calls, dbpedia.cache_hit, dbpedia.entity_found

Key methods:

lookupDbpediaEntity(name: string): Promise<DbpediaEntity | null>
getDbpediaProperties(resourceUri: string): Promise<DbpediaProperties | null>
formatDbpediaContext(entity: DbpediaEntity): string | null

Acceptance: Can look up "Albert Einstein" → structured properties including birth/death dates, awards, notable works, institutions.

Challenge 2: Wire Into Evidence Pipeline

File: packages/ai/src/validation/evidence.ts

Add DBpedia as a general-purpose source in Phase 4b, after Wikipedia and Wikidata but before the AI reasoner:

// General enrichment — all domains (no topic gating)
const dbpediaResult = await lookupDbpediaEntity(entityName)
if (dbpediaResult) {
  const context = formatDbpediaContext(dbpediaResult)
  if (context) {
    findings.push(`DBpedia: ${context}`)
    sources.push({ name: 'DBpedia', type: 'corroborating' })
  }
}

No topic gating — DBpedia covers all domains. The AI reasoner (Phase 4c) gets richer structured context to verify claims against.

Acceptance: Evidence pipeline includes DBpedia properties in reasoner prompt for all entity lookups.

Challenge 3: Tests

File: packages/ai/src/__tests__/dbpedia-client.test.ts (new)

  • Response parsing tests
  • Cache behavior tests
  • formatDbpediaContext output tests
  • Graceful failure when entity not found

Cost

Zero. Free API, no key, no rate limit.

Dependencies

None. Uses fetch.