Using developer mode for conversational search

You can use developer mode for conversational search to easily access debug information that is normally only available on the internal logs when the SmartHub log level is set to Debug. Developer mode works independently of the SmartHub log level setting.

Prerequisites

Note the following prerequisites for conversational search developer mode

Accessing developer mode

To access conversational search in developer mode, the conversational search query must be prefixed by “-debug” after the question. For example, refer to the following:

  • The following debug queries are permitted:

    • "How to write a policy document?-debug"

    • "How to write a policy document?   -debug"

    • "How to write a policy document?-DEBUG"

  • The following debug queries are not permitted:

    • "-debugHow to write a policy document?"

    • "How to -debugwrite a policy document?"

Information included in debug fields

The following fields are collected by conversational search in developer mode:

  • Executed Query: This is an object that represents the entire search query object that was used for the initial search. The following are important sub-fields that are also collected:

    • QueryText: This field is displays the rewritten user question.

    • QueryTemplate: This field displays the template used to process the user question.

    • SelectProperties: This field displays the Metadata Properties and Original Document Properties that are configured on Conversational Bot Settings page.

    • SelectedBackends: This field displays the search engines that are configured on Conversational Bot Settings page.

    • RowLimit: This field displays the maximum number of chunks to use as configured on Conversational Bot Settings page.

    • RefinementFilters: This field displays the refinement filters that were applied to the question.

    • Refiners: This field displays the refiners that were applied to the question.

  • Original Results: This is an object that represents the entire response from the initial search query. The following are important sub-fields that are also collected:

    • RelevantResults: This field displays any relevant results that were generated based on the query.

    • PerformanceInformation: This field displays detailed information on the time spent running the query.

  • Chunks For LLM: This is an array of objects that displays the extracted chunks based on the RelevantResults from the Original search results.

  • Executed Prompts by LLM: This displays the following prompts that were generated by the LLM:

    • Question Rewrite Prompt: This displays various fields related to the rewritten user question. This field is only present for the second answer per conversation onwards:

      • Prompt: This displays final prompt for rewriting the question, based on the chat history.

      • Raw Response: This displays a string of the rewritten question.

    • Answer Prompt: This displays various fields related to the answer:

      • Prompt: This displays the final prompt for answer generation.

      • Raw Response:This is an object displaying additional details on the raw answer response:

        • Line by Line Raw Response: This is an array of extracted answers from the chunk stream response, read line by line, before processing.

        • Complete Raw Response: This is a string of the complete extracted answer, before processing.

    • FollowUp Questions Prompt: This displays various fields related to the follow up questions:

      • Prompt: This displays the final prompt for follow-up questions generation.

      • Raw Response: This is a string of the generated follow-up questions.

  • Time spent: Various fields that display the time, in milliseconds, that it took to complete the following:

    • Get Standalone Question

    • Get Search Query

    • Run Query

    • Extract Chunks from Search Results

    • Get Stream Answer

    • Process Response Stream

    • Update Chat History

    • Get Proof Documents

    • Retrieve FollowUp Questions

  • Errors: This displays any errors that were encountered during conversational search.

  • Warnings: This displays any warnings that were encountered during conversational search.

Using Debug Panel Controls

The debug information panel can be displayed in two modes: View and Text.

In View mode, you can see the individual fields and expand or collapse them as desired. This mode also comes with search functionality. After typing in the search bar, you can click on the body of the tree and press Enter to move to the next highlighted match, or press Shift + Enter to return to the previous one.

In Text mode, you can format, compact, or repair the JSON object, or select and copy the whole object if needed.