Skip to content

feat: add find_context_attributions() intrinsic function #677

@dennislwei

Description

@dennislwei

Add find_context_attributions() to mellea/stdlib/components/intrinsic/core.py as a high-level API for the context-attribution intrinsic. The function finds context sentences (in prior conversation messages and RAG documents) that were most important to the LLM in generating each response sentence.

Changes:

  • mellea/stdlib/components/intrinsic/core.py: add find_context_attributions()
  • mellea/backends/adapters/catalog.py: add context-attribution catalog entry pointing to ibm-granite/granitelib-core-r1.0
  • docs/examples/intrinsics/context_attribution.py: usage example
  • test/stdlib/components/intrinsic/test_core.py: add test_find_context_attributions with test data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions