# llm-content-enrichment — repo context

> Curated overview for code_search. Source: `publicgoodsw/llm-content-enrichment` (GitHub). AWS Lambda (Python).

## Purpose
**AI content-analysis AWS Lambda** — enriches articles with structured metadata
using OpenAI GPT models. Shared by two systems:
- **RAG pipeline** (via `rag-llm-orchestrator`): dense summaries, hierarchical
  classification (knowledge-graph taxonomy), entity extraction (people, orgs,
  locations, products, events, concepts, legislation), optional ad keywords / IAB
  categories, optional example questions.
- **Content-ID system** (direct call): example questions (Search.com PublicGood
  widget engagement), advertising keywords, ADX category (via bypass function).

## Structure
- `lambda_function.py` — the Lambda handler (analysis types requested individually or combined)
- `test_lambda_local.py`, `test_payload*.json` — local testing
- `Dockerfile`, `deploy-container.sh`, `lambda-trust-policy.json`, `secrets-policy.json` — container + AWS deploy
- `content_graph.csv`, `mappings.txt` — taxonomy/knowledge-graph data

## Tech
Python · AWS Lambda (container image) · OpenAI GPT · AWS Secrets Manager.
Per-partner enablement configured in the Content-ID DB `llm_config` table.
