Skip to content

feat(feedback): implement feedback summaries asset and job - #2604

Open
rachellougee wants to merge 4 commits into
mainfrom
feat/feedback-summaries-2542
Open

feat(feedback): implement feedback summaries asset and job#2604
rachellougee wants to merge 4 commits into
mainfrom
feat/feedback-summaries-2542

Conversation

@rachellougee

@rachellougee rachellougee commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What are the relevant tickets?

Close #2542

Description (What does it do?)

Builds the feedback_summaries Dagster asset

  • Reads int__feedback__conversation, calls an LLM to generate conversation_summary per multi-turn conversation
  • Skip rule: single-turn conversations, and multi-turn ones under 500 characters, are not summarized
  • Incremental, and change-awareness: only summarizes new or changed conversations (a ticket that gains a new comment gets re-summarized, not skipped forever).
  • Supports Anthropic, OpenAI, and AWS Bedrock as the LLM backend (needs to confirm with @blarghmatey if Bedrock is configured on production)
  • Fixes a PII-redaction bug where a URL could be misread and redacted as a person's name.

How can this be tested?

int__feedback__conversation must exist in your dev schema. If it doesn't, copy it from production:

  create table ol_data_lake_production.ol_warehouse_production_<suffix>_intermediate.int__feedback__conversation                                                 
  as                                                                                                                                                             
  select * from ol_data_lake_production.ol_warehouse_production_intermediate.int__feedback__conversation;  
  • Run the unit test suite:
 cd dg_projects/ml                                                                                                                                              
 uv run pytest ml_tests/ -q 
  export DBT_SCHEMA_SUFFIX=<your schema suffix>                                                                                                                  
  export DAGSTER_ENV=dev                                                                                                                           
  export ANTHROPIC_API_KEY=...                                                                                                                                   
  export ANTHROPIC_BASE_URL=https://parley.api.mit.edu

  uv run dagster dev -m ml.definitions    
  • In the Dagster UI, materialize feedback_summaries with a small sample_limit via Launchpad config:
 ops:                                                                                                                                                           
   feedback_summaries:                                                                                                                                          
     config:                                                                                                                                                    
       sample_limit: 100      

Expected log line: Summarized 100 new conversations (0 already summarized, 100 total upstream).

Query the output table

select * from ol_data_lake_production."ol_warehouse_production_rlougee_intermediate".feedback_summaries

Additional Context

For deployment step, do a Full refresh — feedback_redacted to fixes historical mis-redactions:

  ops:                                                                                                                                                           
    feedback_redacted:                                                                                                                                           
      config:                                                                                                                                                    
        full_refresh: true      

@rachellougee
rachellougee marked this pull request as ready for review August 27, 2026 19:17
Copilot AI balanced review requested due to automatic review settings August 27, 2026 19:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an incremental Dagster asset for LLM-generated feedback conversation summaries, including provider support and PII-redaction improvements.

Changes:

  • Adds conversation summarization, skip rules, and incremental processing.
  • Adds Bedrock authentication and automation/job configuration.
  • Updates PII redaction behavior and unit tests.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
ml/resources/llm.py Adds Bedrock and local environment authentication.
ml/lib/summarize.py Implements summarization and incremental filtering.
ml/lib/redact.py Adjusts overlapping URL/PII handling.
ml/definitions.py Registers the asset, job, sensor, and resource.
ml/assets/feedback_summaries.py Defines the summaries Dagster asset.
ml_tests/test_summarize.py Tests summary rules and incremental filtering.
ml_tests/test_redact.py Adds URL-overlap regression coverage.
ml_tests/test_llm.py Tests Bedrock client creation and caching.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread dg_projects/ml/ml/lib/summarize.py Outdated
Comment thread dg_projects/ml/ml/lib/summarize.py Outdated
Comment thread dg_projects/ml/ml/assets/feedback_summaries.py Outdated
Comment thread dg_projects/ml/ml/lib/summarize.py Outdated
Comment thread dg_projects/ml/ml/lib/redact.py
Comment thread dg_projects/ml/ml/lib/redact.py
Comment thread dg_projects/ml/ml/assets/feedback_summaries.py
Comment thread dg_projects/ml/ml/assets/feedback_summaries.py
Comment thread dg_projects/ml/ml_tests/test_redact.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conversation summarization asset + skip rule (the one per-record LLM cost)

2 participants