Skip to content

Conversation

@LucianPopaIBM
Copy link

@LucianPopaIBM LucianPopaIBM commented Jan 31, 2026

Component PR

Use this template when adding or modifying components in mellea/stdlib/components/.

Description

  • Link to Issue:

Implementation Checklist

Protocol Compliance

  • parts() returns list of constituent parts (Components or CBlocks)
  • format_for_llm() returns TemplateRepresentation or string
  • _parse(computed: ModelOutputThunk) parses model output correctly into the specified Component return type

Content Blocks

  • CBlock used appropriately for text content
  • ImageBlock used for image content (if applicable)

Integration

  • Component exported in mellea/stdlib/components/__init__.py or, if you are adding a library of components, from your sub-module

Testing

  • Tests added to tests/components/
  • New code has 100% coverage
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Add support for the query_clarification RAG intrinsic, which detects
ambiguous queries and generates clarification questions.

Changes:
- Add clarify_query() function to rag.py
- Register query_clarification intrinsic in catalog
- Add example script demonstrating usage
- Add comprehensive tests for positive and negative cases
- Add test data JSON files for both test scenarios
- Add "Wight" to codespell ignore list (Isle of Wight is a place name)

The intrinsic returns a clarification question for ambiguous queries
or the string "CLEAR" when no clarification is needed.

Tests verified passing on granite-4.0-micro with query_clarification
LoRA adapter from ibm-granite/granite-lib-rag-r1.0.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@mergify
Copy link

mergify bot commented Jan 31, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|release)(?:\(.+\))?:

@github-actions
Copy link
Contributor

The PR description has been updated. Please fill out the template for your PR to be reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant