Store ingestion AI responses for classification audit#24
Store ingestion AI responses for classification audit#24nicholasjpanella wants to merge 1 commit into
Conversation
Add ai_responses table linked to ai_usage so discovery, enrich, editorial, extract, and suggest LLM calls retain prompts and structured output for classification debugging. Wire all ingestion call sites through the extended logAiUsage helper. Co-authored-by: Nicholas P. <nicholasjpanella@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Summary by QodoPersist ingestion LLM prompts/outputs via ai_responses linked to ai_usage Description
Diagram
High-Level Assessment
Files changed (20)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
16 rules 1. Indexed subjectName too long
|
Summary
Adds an
ai_responsestable linked toai_usageso ingestion LLM calls retain prompts and structured output for debugging classification decisions (e.g. why a place was labeled speakeasy).Type of change
Testing
npm run typechecknpm run db:push(schema applied to Neon)npm run lint(pre-existing errors unrelated to this change)Checklist
Notes for reviewers
baywire.ai_responseswith FK toai_usage(cascade delete).logAiUsage()for: discover, enrich, editorial (place + event), event extract, listing extract, suggest event.system_prompt,user_prompt,parsed_output, optionalentity_type/entity_id,subject_name(pre-persist),taxonomy_version,prompt_revision.