feat(citations): add per-claim citations to AI briefs
LLM prompts updated to output {text, citation, quote} objects for every
key_point and risk. govinfo_url stored on BillBrief (migration 0006) so
the frontend can link directly to the source document without an extra
query. AIBriefCard renders § citation chips that expand inline to show
the verbatim quote and a View source → GovInfo link. Old plain-string
briefs continue to render unchanged.
Authored-By: Jack Levy
This commit is contained in:
21
backend/alembic/versions/0006_add_brief_govinfo_url.py
Normal file
21
backend/alembic/versions/0006_add_brief_govinfo_url.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""add govinfo_url to bill_briefs
|
||||
|
||||
Revision ID: 0006
|
||||
Revises: 0005
|
||||
Create Date: 2026-02-28
|
||||
"""
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision = "0006"
|
||||
down_revision = "0005"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column("bill_briefs", sa.Column("govinfo_url", sa.String(), nullable=True))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column("bill_briefs", "govinfo_url")
|
||||
Reference in New Issue
Block a user