Skip to content

Conversation

@sriroopar
Copy link
Contributor

@sriroopar sriroopar commented Nov 12, 2025

Description

Added info logs to display information on document retrieved, indices, rank, score and the final document that's picked based on the metrics.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.
    Verified by running RAG test suite and logs were checked.
image

@openshift-ci openshift-ci bot requested review from bparees and onmete November 12, 2025 21:44
@openshift-ci
Copy link

openshift-ci bot commented Nov 12, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign joshuawilson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sriroopar sriroopar force-pushed the byok_log_enhancements branch from 3035f96 to 6775874 Compare November 12, 2025 22:15
@sriroopar
Copy link
Contributor Author

/retest

5 similar comments
@sriroopar
Copy link
Contributor Author

/retest

@sriroopar
Copy link
Contributor Author

/retest

@sriroopar
Copy link
Contributor Author

/retest

@sriroopar
Copy link
Contributor Author

/retest

@sriroopar
Copy link
Contributor Author

/retest

 #Reverting the storing changes
@sriroopar sriroopar force-pushed the byok_log_enhancements branch from e9c6284 to b559dd8 Compare November 18, 2025 16:58
@sriroopar
Copy link
Contributor Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Nov 18, 2025

@sriroopar: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.


available_tokens = min(tokens_count, max_tokens)
logger.debug("Available tokens: %d.", tokens_count)
logger.debug("Available tokens: %d.", available_tokens)
Copy link
Contributor

Choose a reason for hiding this comment

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

I supose this should show the total number of available tokens in the context window, but it is not showing that:

2025-11-19 08:03:01,970 [ols.utils.token_handler:token_handler.py:152] DEBUG: RAG content tokens count: 345.
2025-11-19 08:03:01,970 [ols.utils.token_handler:token_handler.py:155] DEBUG: Available tokens: 345.
2025-11-19 08:03:01,970 [ols.utils.token_handler:token_handler.py:169] INFO: Document #2 selected: title='Preparing your cluster for OpenShift Virtualization', url='https://docs.openshift.com/container-platform/4.17/virt/install/preparing-cluster-for-virt.html', index='default', score=0.5925, tokens=345
2025-11-19 08:03:01,971 [ols.utils.token_handler:token_handler.py:152] DEBUG: RAG content tokens count: 358.
2025-11-19 08:03:01,971 [ols.utils.token_handler:token_handler.py:155] DEBUG: Available tokens: 358.
2025-11-19 08:03:01,971 [ols.utils.token_handler:token_handler.py:169] INFO: Document #3 selected: title='Installing a cluster on any platform', url='https://docs.openshift.com/container-platform/4.17/installing/installing_platform_agnostic/installing-platform-agnostic.html', index='default', score=0.5889, tokens=358

It is showing the same number twice.

"""Initialize custom query fusion class."""
# Extract custom parameters before passing to parent
retriever_weights = kwargs.pop("retriever_weights", None)
index_configs = kwargs.pop("index_configs", None)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why pop instead of get? Do you need to modify input kwargs?

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.

2 participants