Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Round table values for AI prompt#3124

Merged
vladsavelyev merged 9 commits into
mainfrom
round-table-for-prompt
Mar 19, 2025
Merged

Round table values for AI prompt#3124
vladsavelyev merged 9 commits into
mainfrom
round-table-for-prompt

Conversation

@vladsavelyev

Copy link
Copy Markdown
Contributor

Round table values for AI prompt. Add a test.
Re #3108

@vladsavelyev vladsavelyev added this to the v1.28 milestone Mar 17, 2025
@schorlton-bugseq

schorlton-bugseq commented Mar 17, 2025

Copy link
Copy Markdown
Contributor

Thank you @vladsavelyev!! Super appreciate this. One thought: if I understand this, it rounds all floats in a table to 2 decimals before submitting to AI. However, is this how the MultiQC tables work? I thought (maybe incorrectly) that each column of a table had its own decimal places configured (https://docs.seqera.io/multiqc/development/plots#table-decimal-places, although maybe 2 is the default?). Would it be better to use the same number of decimals set for the column in the table if it is set (else use default)? I could imagine that 2 decimals may sometimes be perfect, but other times too few or too many for a table field to pass to the AI. If the user has configured the number of decimals to include in the report, we would want to match that in the AI prompt. It could be odd if the table shows the user a table in the MultiQC report:

Days from now Probability of the world ending
1 0.004

and then we get a response like
image

@vladsavelyev

Copy link
Copy Markdown
Contributor Author

Good call! I updated it to respect the table column format field:

{
    "plot_type": "generalstats",
    "id": "Genome Info",
    "pconfig": {
        "Abundance": {
            "max": 100,
            "min": 0,
            "suffix": "%",
            "scale": "Blues",
            "format": "{:,.4f}",
            "description": "Reads assigned to the row's taxon / total read count X 100. This column only factors in reads directly classified to the listed taxon and does not include reads classified to the children of this taxon. The sum of this column is 100.",
        }
    },
    "data": {"Root": {"Abundance": 0.3802136069332063}},
}

->

|Sample Name|Abundance|
|---|---|
|Root|0.3802|

@vladsavelyev vladsavelyev merged commit dc052af into main Mar 19, 2025
@vladsavelyev vladsavelyev deleted the round-table-for-prompt branch March 19, 2025 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants