Skip to content

UN-3008 [FEAT] Add word-level confidence support - #1672

Merged
Deepak-Kesavan merged 11 commits into
mainfrom
UN-3008-word-level-confidence
Nov 24, 2025
Merged

UN-3008 [FEAT] Add word-level confidence support#1672
Deepak-Kesavan merged 11 commits into
mainfrom
UN-3008-word-level-confidence

Conversation

@Deepak-Kesavan

Copy link
Copy Markdown
Contributor

Summary

Implements word-level confidence scoring feature that extends the existing document highlighting functionality. This allows users to track confidence scores at the word level during extraction, providing more granular feedback about extraction quality.

Key Features:

  • New enable_word_confidence toggle in CustomTool model
  • Word confidence postamble support for custom prompts
  • Integrated confidence data collection throughout extraction pipeline
  • Dependency validation (requires enable_highlight to be enabled)

Technical Changes:

  • Added database migration for enable_word_confidence field
  • Updated constants across backend and prompt service
  • Plumbed word confidence flags through extraction, indexing, and answer prompt services
  • Modified SDK to preserve original text for post-processing
  • Added word_confidence_data to metadata responses

Test Plan

  • Run migrations and verify database schema
  • Test enabling word confidence without highlights (should be disabled)
  • Test enabling word confidence with highlights enabled
  • Verify word confidence data is captured in extraction responses
  • Test with different LLM providers
  • Verify backward compatibility with existing tools without this feature

Add word-level confidence feature that extends the existing highlight functionality. This feature allows tracking confidence scores at the word level during extraction.

Key changes:
- Add enable_word_confidence field to CustomTool model
- Add word_confidence_postamble support for custom prompts
- Pass word_confidence flag through extraction and indexing pipelines
- Update SDK to preserve original text for post-processing
- Add dependency check to ensure word confidence requires highlight to be enabled
@coderabbitai

coderabbitai Bot commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Release Notes

  • New Features
    • Added word-level confidence feature to custom tools with configurable enable/disable toggle (dependent on highlight feature).
    • Word confidence data is now captured, stored, and displayed in result details.
    • Enhanced result display to show word-level confidence scores alongside existing confidence metrics for improved granularity.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Adds word-level confidence support: new constants, model fields + migrations, threading enable_word_confidence and word_confidence_data through indexing/extraction/prompt-service/SDK, persisting word confidence, and propagating wordConfidenceData to frontend renderers.

Changes

Cohort / File(s) Summary
Constants
backend/prompt_studio/prompt_studio_core_v2/constants.py, backend/prompt_studio/prompt_studio_registry_v2/constants.py, prompt-service/src/unstract/prompt_service/constants.py, backend/workflow_manager/workflow_v2/constants.py
Added ENABLE_WORD_CONFIDENCE, WORD_CONFIDENCE_POSTAMBLE, and WORD_CONFIDENCE_DATA keys to constant classes.
CustomTool model & migration
backend/prompt_studio/prompt_studio_core_v2/models.py, backend/prompt_studio/prompt_studio_core_v2/migrations/0005_customtool_enable_word_confidence.py
Added enable_word_confidence BooleanField (default=False, db_comment) to CustomTool with migration.
PromptStudioOutputManager model & migration
backend/prompt_studio/prompt_studio_output_manager_v2/models.py, backend/prompt_studio/prompt_studio_output_manager_v2/migrations/0004_promptstudiooutputmanager_word_confidence_data.py
Added word_confidence_data JSONField (null/blank, db_comment) to PromptStudioOutputManager with migration.
Prompt-studio helpers
backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py, backend/prompt_studio/prompt_studio_output_manager_v2/output_manager_helper.py
Threaded enable_word_confidence, word_confidence_data, and doc_id through indexing/extraction/dynamic_extractor and persistence flows.
Registry export
backend/prompt_studio/prompt_studio_registry_v2/prompt_studio_registry_helper.py
Exported enable_word_confidence in frame_spec and added WORD_CONFIDENCE_POSTAMBLE and flag in exported tool_settings.
Prompt-service DTOs & controllers
prompt-service/src/unstract/prompt_service/dto.py, prompt-service/src/unstract/prompt_service/controllers/indexing.py, prompt-service/src/unstract/prompt_service/controllers/extraction.py, prompt-service/src/unstract/prompt_service/controllers/answer_prompt.py
Added enable_word_confidence to ProcessingOptions, read it from payloads, and pass it into indexing, extraction, and answer controllers.
AnswerPrompt service logic
prompt-service/src/unstract/prompt_service/services/answer_prompt.py
Threaded enable_word_confidence and word_confidence_postamble into prompt construction and run flow; gated behavior when highlights disabled or summarize-as-source; include WORD_CONFIDENCE_DATA in metadata when present.
SDK LLM post-processing
unstract/sdk1/src/unstract/sdk1/llm.py
Preserve original LLM response_text and pass original_text as a third argument to post_process_fn (signature updated).
Frontend: state & rendering
frontend/src/hooks/usePromptOutput.js, frontend/src/components/custom-tools/document-manager/DocumentManager.jsx, frontend/src/components/custom-tools/prompt-card/DisplayPromptResult.jsx, frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx
Added wordConfidenceData to outputs state, compute averaged object-format confidences, and thread wordConfidenceData through rendering and click handlers to surface word-level confidence.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant ToolCfg as Tool Config
    participant Backend as PromptStudio Backend
    participant Registry as Registry Export
    participant Service as Prompt Service
    participant LLM as LLM / SDK
    participant Frontend as Frontend Renderer

    ToolCfg->>Backend: set enable_word_confidence
    Backend->>Registry: include enable_word_confidence in export
    Registry->>Service: tool_settings.enable_word_confidence

    Service->>Service: compute word_confidence_postamble if enabled
    alt enabled & enable_highlight true
        Service->>LLM: run prompt with postamble
    else
        Service->>LLM: run prompt without postamble
    end

    LLM->>LLM: post-process (original_text preserved)
    alt returns word confidence
        LLM-->>Service: metadata includes WORD_CONFIDENCE_DATA
    end

    Service-->>Backend: persist response + word_confidence_data
    Backend-->>Frontend: include wordConfidenceData in output payload
    Frontend->>Frontend: render using wordConfidenceData
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Focus areas:
    • Verify consistent propagation of enable_word_confidence across dynamic_extractor, ProcessingOptions, controllers, and AnswerPromptService call sites.
    • Confirm conditional logic: disabling when enable_highlight is false and clearing postamble when summarize_as_source is true.
    • Validate migrations, model defaults, and db_comment text.
    • Ensure original_text is captured and passed to post_process_fn without breaking existing callbacks.
    • Frontend: validate object-format averaging logic and that wordConfidenceData is correctly threaded to renderers and click handlers.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The description covers most required sections: Summary (what and why), Key Features, Technical Changes, and Test Plan. However, critical sections like 'Can this PR break any existing features' and 'Database Migrations' sections from the template are not explicitly filled, though database changes are mentioned in Technical Changes. Add explicit 'Breaking Changes' and 'Database Migrations' sections to match the template structure, clarifying which migrations are included and any potential backward compatibility concerns.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding word-level confidence support. It is specific, concise, and directly related to the primary feature being implemented across the codebase.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch UN-3008-word-level-confidence

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
unstract/sdk1/src/unstract/sdk1/llm.py (2)

477-477: Update the type hint to match the new signature.

The type hint for post_process_fn still reflects the old 2-parameter signature, but the actual invocation at lines 500-502 passes 3 parameters including original_text. This type mismatch will cause type-checking errors.

Apply this diff to fix the type hint:

     def _post_process_response(
         self,
         response_text: str,
         extract_json: bool,
-        post_process_fn: Callable[[LLMResponseCompat, bool], dict[str, object]] | None,
+        post_process_fn: Callable[[LLMResponseCompat, bool, str], dict[str, object]] | None,
     ) -> tuple[str, dict[str, object]]:

228-234: Update the type casting to reflect the new signature.

The type cast at lines 229-234 still uses the old 2-parameter signature for post_process_fn. This should be updated to match the new 3-parameter signature.

Apply this diff:

             extract_json: bool = cast("bool", kwargs.get("extract_json", False))
             post_process_fn: (
-                Callable[[LLMResponseCompat, bool], dict[str, object]] | None
+                Callable[[LLMResponseCompat, bool, str], dict[str, object]] | None
             ) = cast(
-                "Callable[[LLMResponseCompat, bool], dict[str, object]] | None",
+                "Callable[[LLMResponseCompat, bool, str], dict[str, object]] | None",
                 kwargs.get("process_text", None),
             )
🧹 Nitpick comments (2)
prompt-service/src/unstract/prompt_service/services/answer_prompt.py (1)

387-387: Consider removing unused parameter.

Static analysis correctly identifies that enable_word_confidence is accepted but never used in the handle_json function body. The word confidence data is already handled in run_completion (lines 261-264).

Unless this parameter is reserved for future functionality, consider removing it to keep the API surface clean.

If the parameter is not needed, apply this diff:

     def handle_json(
         answer: str,
         structured_output: dict[str, Any],
         output: dict[str, Any],
         log_events_id: str,
         tool_id: str,
         doc_name: str,
         llm: LLM,
         enable_highlight: bool = False,
-        enable_word_confidence: bool = False,
         execution_source: str = ExecutionSource.IDE.value,
         metadata: dict[str, Any] | None = None,
         file_path: str = "",
     ) -> None:

And update the caller in prompt-service/src/unstract/prompt_service/controllers/answer_prompt.py lines 505-507:

                 AnswerPromptService.handle_json(
                     answer=answer,
                     structured_output=structured_output,
                     output=output,
                     log_events_id=log_events_id,
                     tool_id=tool_id,
                     doc_name=doc_name,
                     llm=llm,
                     enable_highlight=tool_settings.get(PSKeys.ENABLE_HIGHLIGHT, False),
-                    enable_word_confidence=tool_settings.get(
-                        PSKeys.ENABLE_WORD_CONFIDENCE, False
-                    ),
                     execution_source=execution_source,
                     metadata=metadata,
                     file_path=file_path,
                 )
backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py (1)

1313-1321: Add model-level validation for the enable_word_confidence dependency.

Verification confirms the concern is valid. The CustomTool model defines both enable_highlight and enable_word_confidence fields (lines 138-143 in models.py) without any constraint validation. While the prompt service enforces the dependency downstream at answer_prompt.py lines 124-126 (silently resetting enable_word_confidence to False when highlighting is disabled), there is no model-level or serializer-level validation to prevent the invalid state from being persisted to the database.

Recommended approach: Add a clean() method to the CustomTool model or a validate_enable_word_confidence method to the CustomToolSerializer to enforce: if enable_word_confidence=True, then enable_highlight must also be True.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between f46654f and bcbea8a.

📒 Files selected for processing (13)
  • backend/prompt_studio/prompt_studio_core_v2/constants.py (3 hunks)
  • backend/prompt_studio/prompt_studio_core_v2/migrations/0005_customtool_enable_word_confidence.py (1 hunks)
  • backend/prompt_studio/prompt_studio_core_v2/models.py (1 hunks)
  • backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py (7 hunks)
  • backend/prompt_studio/prompt_studio_registry_v2/constants.py (1 hunks)
  • backend/prompt_studio/prompt_studio_registry_v2/prompt_studio_registry_helper.py (2 hunks)
  • prompt-service/src/unstract/prompt_service/constants.py (2 hunks)
  • prompt-service/src/unstract/prompt_service/controllers/answer_prompt.py (1 hunks)
  • prompt-service/src/unstract/prompt_service/controllers/extraction.py (2 hunks)
  • prompt-service/src/unstract/prompt_service/controllers/indexing.py (2 hunks)
  • prompt-service/src/unstract/prompt_service/dto.py (1 hunks)
  • prompt-service/src/unstract/prompt_service/services/answer_prompt.py (11 hunks)
  • unstract/sdk1/src/unstract/sdk1/llm.py (2 hunks)
🧰 Additional context used
🪛 Ruff (0.14.5)
prompt-service/src/unstract/prompt_service/services/answer_prompt.py

387-387: Unused static method argument: enable_word_confidence

(ARG004)

backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py

1240-1240: Undefined name doc_id

(F821)

backend/prompt_studio/prompt_studio_core_v2/migrations/0005_customtool_enable_word_confidence.py

7-9: Mutable class attributes should be annotated with typing.ClassVar

(RUF012)


11-20: Mutable class attributes should be annotated with typing.ClassVar

(RUF012)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (17)
backend/prompt_studio/prompt_studio_registry_v2/constants.py (1)

101-101: LGTM!

The constant addition follows the existing pattern and is properly placed adjacent to the related ENABLE_HIGHLIGHT constant.

prompt-service/src/unstract/prompt_service/dto.py (1)

38-38: LGTM!

The field addition is clean and follows the existing pattern. The default value of False is appropriate, and the placement after enable_highlight aligns with the feature dependency.

prompt-service/src/unstract/prompt_service/controllers/indexing.py (2)

63-63: LGTM with validation caveat.

The extraction and forwarding of enable_word_confidence follows the established pattern. However, similar to the extraction controller, ensure that dependency validation (requiring enable_highlight) is properly enforced and communicated back through this API endpoint.


83-88: LGTM!

The multiline formatting of ProcessingOptions initialization improves readability, and all required fields including the new enable_word_confidence are properly passed.

backend/prompt_studio/prompt_studio_core_v2/migrations/0005_customtool_enable_word_confidence.py (1)

1-20: LGTM! Migration structure is correct.

The migration properly adds the enable_word_confidence field with appropriate defaults and documentation. The db_comment documents the dependency on enable_highlight, though enforcement should be at the model or serializer level.

Note: The static analysis hints about ClassVar are false positives—Django migration class attributes are intentionally not annotated with ClassVar.

backend/prompt_studio/prompt_studio_registry_v2/prompt_studio_registry_helper.py (2)

81-86: LGTM!

The property definition follows the established pattern for enable_highlight and properly documents the dependency in the description. The spec structure is consistent with other boolean flags.


292-292: LGTM!

The export of enable_word_confidence to tool settings is consistent with the enable_highlight pattern on line 291, ensuring the feature flag is properly propagated through the registry.

backend/prompt_studio/prompt_studio_core_v2/constants.py (1)

96-96: LGTM! Constants follow existing patterns.

The new word confidence constants are properly structured and consistent with existing naming conventions. The default value of False is appropriate for a new opt-in feature.

Also applies to: 102-102, 171-171, 196-196

prompt-service/src/unstract/prompt_service/controllers/answer_prompt.py (1)

505-507: LGTM! Consistent parameter passing.

The enable_word_confidence parameter is retrieved from tool_settings with an appropriate default and passed through to handle_json, following the same pattern as enable_highlight.

prompt-service/src/unstract/prompt_service/constants.py (1)

66-66: LGTM! Well-structured constant additions.

The new constants for word confidence functionality are properly placed and follow the existing naming conventions across PromptServiceConstants and IndexingConstants.

Also applies to: 74-74, 78-78, 194-194

backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py (4)

415-416: LGTM! Properly passing word confidence parameters.

The enable_word_confidence and doc_id parameters are correctly passed to dynamic_extractor. The doc_id is properly calculated at lines 396-406 before this call.


875-876: LGTM! Parameters correctly threaded through.

The word confidence parameters are appropriately passed to dynamic_extractor, with doc_id properly calculated at lines 849-859.


979-979: LGTM! Tool settings properly configured.

The enable_word_confidence flag and word_confidence_postamble are correctly added to tool_settings, following the same pattern as other configuration settings.

Also applies to: 983-985


1259-1259: LGTM! Single-pass settings configured correctly.

The word confidence settings are properly added to tool_settings for single-pass extraction mode, consistent with the pattern used in regular extraction.

Also applies to: 1264-1266

prompt-service/src/unstract/prompt_service/services/answer_prompt.py (3)

118-126: Good dependency enforcement.

The implementation correctly enforces that enable_word_confidence requires enable_highlight to be enabled (lines 124-126). This prevents an invalid configuration state at the service layer.


191-192: LGTM! Postamble construction is correct.

The word confidence postamble is properly appended to the platform postamble when enabled, maintaining the correct order of prompt components.


238-238: LGTM! Word confidence data flow is properly implemented.

The enable_word_confidence flag is correctly:

  1. Passed to the highlight data plugin (line 238)
  2. Retrieved from the completion response (line 248)
  3. Conditionally stored in metadata when enabled (lines 261-264)

Also applies to: 248-248, 261-264

Comment thread backend/prompt_studio/prompt_studio_core_v2/models.py
Comment thread backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py Outdated
Comment thread prompt-service/src/unstract/prompt_service/controllers/extraction.py Outdated
Comment thread unstract/sdk1/src/unstract/sdk1/llm.py

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
frontend/src/components/custom-tools/document-manager/DocumentManager.jsx (1)

383-399: Consider refactoring confidence calculation to a helper function.

The new word confidence handling logic is correct and properly validates the object format. However, the confidence display logic now handles four different formats (number, object, nested array, empty array), which increases cognitive complexity within the JSX.

For improved maintainability, consider extracting this logic into a dedicated helper function:

const calculateConfidenceScore = (confidence) => {
  // Handle numeric confidence
  if (typeof confidence === "number") {
    return confidence.toFixed(2);
  }
  
  // Handle word confidence format: object with line numbers as keys
  if (confidence && typeof confidence === "object" && !Array.isArray(confidence)) {
    const values = Object.values(confidence);
    if (values.length > 0 && values.every((v) => typeof v === "number" && !isNaN(v) && isFinite(v))) {
      const avg = values.reduce((sum, val) => sum + val, 0) / values.length;
      return avg.toFixed(2);
    }
  }
  
  // Handle old nested array format
  if (confidence?.[0]?.[0]?.confidence) {
    return confidence[0][0].confidence;
  }
  
  // Handle old empty array format
  if (Array.isArray(confidence?.[0]) && confidence[0].length === 0) {
    return "1";
  }
  
  return "NA";
};

Then use it in the JSX:

<Tag color="rgb(45, 183, 245)">
  Confidence Score: {calculateConfidenceScore(selectedHighlight?.confidence)}
</Tag>

Optional enhancement: The helper function above also adds validation for NaN and Infinity values when computing the average, providing additional robustness.

</review_comment_end>

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between bcbea8a and b9c9381.

📒 Files selected for processing (4)
  • frontend/src/components/custom-tools/document-manager/DocumentManager.jsx (1 hunks)
  • frontend/src/components/custom-tools/prompt-card/DisplayPromptResult.jsx (10 hunks)
  • frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx (4 hunks)
  • frontend/src/hooks/usePromptOutput.js (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx (1)
frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx (1)
  • promptDetails (34-34)
frontend/src/components/custom-tools/document-manager/DocumentManager.jsx (2)
frontend/src/components/custom-tools/prompt-card/DisplayPromptResult.jsx (1)
  • confidence (268-268)
backend/workflow_manager/endpoint_v2/constants.py (1)
  • values (88-89)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (3)
frontend/src/hooks/usePromptOutput.js (1)

124-124: LGTM!

The addition of wordConfidenceData follows the same pattern as existing fields and properly uses optional chaining to access the API response data.

frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx (1)

22-22: Good catch! The missing useState import is now fixed.

The useState hook is used at line 74, so this import was required. This change fixes a bug where the component would fail due to the missing import.

frontend/src/components/custom-tools/prompt-card/DisplayPromptResult.jsx (1)

25-25: LGTM! Excellent implementation of word confidence support.

The changes properly thread wordConfidenceData through all rendering paths with appropriate fallback logic:

  • Fallback pattern consistently prefers word-level confidence over document-level confidence
  • Data is correctly propagated through recursive renderJson calls for objects and arrays
  • TextResult component properly handles the fallback logic
  • PropTypes are updated to include the new parameter
  • Backward compatibility is maintained via optional chaining

The implementation ensures that when word-level confidence data is available, it takes precedence, while gracefully falling back to the existing confidence data when it's not.

Also applies to: 83-101, 110-225, 230-254, 262-285, 293-293, 307-307

Comment thread frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx
…ext parameter

- Updated post_process_fn type signature from Callable[[LLMResponseCompat, bool], ...]
  to Callable[[LLMResponseCompat, bool, str], ...] to match the actual call at line 500-502
- Addresses review comment: #1672 (comment)
- The highlight_data plugin's run() method already accepts the third parameter (original_text: str)

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

♻️ Duplicate comments (1)
unstract/sdk1/src/unstract/sdk1/llm.py (1)

229-233: Unify post_process_fn type annotation with 3‑parameter call signature

You updated the post_process_fn type in complete() to accept (LLMResponseCompat, bool, str), and _post_process_response now calls post_process_fn(response_compat, extract_json, original_text), but the _post_process_response parameter annotation still declares a 2‑arg callable. This will trip static type checkers and is inconsistent with the actual usage.

Recommend updating _post_process_response’s signature to match:

-    def _post_process_response(
-        self,
-        response_text: str,
-        extract_json: bool,
-        post_process_fn: Callable[[LLMResponseCompat, bool], dict[str, object]] | None,
-    ) -> tuple[str, dict[str, object]]:
+    def _post_process_response(
+        self,
+        response_text: str,
+        extract_json: bool,
+        post_process_fn: Callable[
+            [LLMResponseCompat, bool, str], dict[str, object]
+        ] | None,
+    ) -> tuple[str, dict[str, object]]:

Also re‑confirm that all callbacks passed via process_text (e.g., highlight/word‑confidence plugins) have been updated to accept the third original_text parameter, otherwise they’ll raise a TypeError at runtime. This is the same concern raised in the earlier review, now that the callsite is wired up.

Also applies to: 473-502

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between cb2f2ff and 43642ff.

📒 Files selected for processing (3)
  • backend/prompt_studio/prompt_studio_registry_v2/prompt_studio_registry_helper.py (2 hunks)
  • backend/workflow_manager/workflow_v2/constants.py (1 hunks)
  • unstract/sdk1/src/unstract/sdk1/llm.py (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • backend/prompt_studio/prompt_studio_registry_v2/prompt_studio_registry_helper.py
🧰 Additional context used
🧬 Code graph analysis (1)
unstract/sdk1/src/unstract/sdk1/llm.py (1)
unstract/sdk1/src/unstract/sdk1/utils/common.py (1)
  • LLMResponseCompat (120-138)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (1)
unstract/sdk1/src/unstract/sdk1/llm.py (1)

481-483: Capturing original_text before JSON extraction looks correct

Storing original_text = response_text before the extract_json manipulation and passing both response_compat (possibly trimmed) and original_text into post_process_fn is a clean way to support word‑level confidence / highlighting without breaking existing JSON extraction behavior.

Also applies to: 499-505

Comment thread backend/workflow_manager/workflow_v2/constants.py Outdated
- Removed WORD_CONFIDENCE_DATA constant as it's not used in main repo's workflow manager
- The constant is only needed in unstract-cloud repo which has the rule engine
- Prompt studio code uses the string directly, which is appropriate
- Addresses review comment: #1672 (comment)
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

Summary
  • Runner Tests: 11 passed, 0 failed (11 total)
  • SDK1 Tests: 66 passed, 0 failed (66 total)

Runner Tests - Full Report
filepath function $$\textcolor{#23d18b}{\tt{passed}}$$ SUBTOTAL
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_logs}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup\_skip}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_client\_init}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image\_exists}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config\_without\_mount}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_run\_container}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image\_for\_sidecar}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_sidecar\_container}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{TOTAL}}$$ $$\textcolor{#23d18b}{\tt{11}}$$ $$\textcolor{#23d18b}{\tt{11}}$$
SDK1 Tests - Full Report
filepath function $$\textcolor{#23d18b}{\tt{passed}}$$ SUBTOTAL
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_success\_on\_first\_attempt}}$$ $$\textcolor{#23d18b}{\tt{2}}$$ $$\textcolor{#23d18b}{\tt{2}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_retry\_on\_connection\_error}}$$ $$\textcolor{#23d18b}{\tt{2}}$$ $$\textcolor{#23d18b}{\tt{2}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_non\_retryable\_http\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_retryable\_http\_errors}}$$ $$\textcolor{#23d18b}{\tt{3}}$$ $$\textcolor{#23d18b}{\tt{3}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_post\_method\_retry}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_retry\_logging}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_prompt.py}}$$ $$\textcolor{#23d18b}{\tt{TestPromptToolRetry.test\_success\_on\_first\_attempt}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_prompt.py}}$$ $$\textcolor{#23d18b}{\tt{TestPromptToolRetry.test\_retry\_on\_errors}}$$ $$\textcolor{#23d18b}{\tt{2}}$$ $$\textcolor{#23d18b}{\tt{2}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_prompt.py}}$$ $$\textcolor{#23d18b}{\tt{TestPromptToolRetry.test\_wrapper\_methods\_retry}}$$ $$\textcolor{#23d18b}{\tt{4}}$$ $$\textcolor{#23d18b}{\tt{4}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_connection\_error\_is\_retryable}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_timeout\_is\_retryable}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_http\_error\_retryable\_status\_codes}}$$ $$\textcolor{#23d18b}{\tt{3}}$$ $$\textcolor{#23d18b}{\tt{3}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_http\_error\_non\_retryable\_status\_codes}}$$ $$\textcolor{#23d18b}{\tt{5}}$$ $$\textcolor{#23d18b}{\tt{5}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_http\_error\_without\_response}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_os\_error\_retryable\_errno}}$$ $$\textcolor{#23d18b}{\tt{5}}$$ $$\textcolor{#23d18b}{\tt{5}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_os\_error\_non\_retryable\_errno}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_other\_exception\_not\_retryable}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCalculateDelay.test\_exponential\_backoff\_without\_jitter}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCalculateDelay.test\_exponential\_backoff\_with\_jitter}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCalculateDelay.test\_max\_delay\_cap}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCalculateDelay.test\_max\_delay\_cap\_with\_jitter}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_successful\_call\_first\_attempt}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_retry\_after\_transient\_failure}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_max\_retries\_exceeded}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_max\_time\_exceeded}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_retry\_with\_custom\_predicate}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_no\_retry\_with\_predicate\_false}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_exception\_not\_in\_tuple\_not\_retried}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_delay\_would\_exceed\_max\_time}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_default\_configuration}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_environment\_variable\_configuration}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_invalid\_max\_retries}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_invalid\_max\_time}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_invalid\_base\_delay}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_invalid\_multiplier}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_jitter\_values}}$$ $$\textcolor{#23d18b}{\tt{2}}$$ $$\textcolor{#23d18b}{\tt{2}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_custom\_exceptions\_only}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_custom\_predicate\_only}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_both\_exceptions\_and\_predicate}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_exceptions\_match\_but\_predicate\_false}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestPreconfiguredDecorators.test\_retry\_platform\_service\_call\_exists}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestPreconfiguredDecorators.test\_retry\_prompt\_service\_call\_exists}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestPreconfiguredDecorators.test\_platform\_service\_decorator\_retries\_on\_connection\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestPreconfiguredDecorators.test\_prompt\_service\_decorator\_retries\_on\_timeout}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryLogging.test\_warning\_logged\_on\_retry}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryLogging.test\_info\_logged\_on\_success\_after\_retry}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryLogging.test\_exception\_logged\_on\_giving\_up}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{TOTAL}}$$ $$\textcolor{#23d18b}{\tt{66}}$$ $$\textcolor{#23d18b}{\tt{66}}$$

@sonarqubecloud

Copy link
Copy Markdown

@Deepak-Kesavan
Deepak-Kesavan merged commit 62611ce into main Nov 24, 2025
7 checks passed
@Deepak-Kesavan
Deepak-Kesavan deleted the UN-3008-word-level-confidence branch November 24, 2025 10:30
Deepak-Kesavan added a commit that referenced this pull request Nov 25, 2025
* UN-3008 [FEAT] Add word-level confidence support

Add word-level confidence feature that extends the existing highlight functionality. This feature allows tracking confidence scores at the word level during extraction.

Key changes:
- Add enable_word_confidence field to CustomTool model
- Add word_confidence_postamble support for custom prompts
- Pass word_confidence flag through extraction and indexing pipelines
- Update SDK to preserve original text for post-processing
- Add dependency check to ensure word confidence requires highlight to be enabled

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* UN-3008 Confidence fixes

* UN-3008 Confidence fixes in backend

* UN-3008 Fix type annotation for post_process_fn to include original_text parameter

- Updated post_process_fn type signature from Callable[[LLMResponseCompat, bool], ...]
  to Callable[[LLMResponseCompat, bool, str], ...] to match the actual call at line 500-502
- Addresses review comment: #1672 (comment)
- The highlight_data plugin's run() method already accepts the third parameter (original_text: str)

* UN-3008 Minor fixes

* UN-3008 Minor fixes

* UN-3008 Remove unused WORD_CONFIDENCE_DATA constant from ResultKeys

- Removed WORD_CONFIDENCE_DATA constant as it's not used in main repo's workflow manager
- The constant is only needed in unstract-cloud repo which has the rule engine
- Prompt studio code uses the string directly, which is appropriate
- Addresses review comment: #1672 (comment)

* UN-3008 Sync with main - remove unwanted params

* UN-3008 Word confidence fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

3 participants