|
| 1 | +--- |
| 2 | +title: "Ask Sensei" |
| 3 | +description: "Ask a question from any page and get an answer built from live, interactive views of your own data." |
| 4 | +draft: false |
| 5 | +audience: pro |
| 6 | +weight: 6 |
| 7 | +--- |
| 8 | + |
| 9 | +**Ask Sensei** answers questions about your findings, Assets and trends from anywhere in the |
| 10 | +DefectDojo Pro UI. Instead of a block of text, an answer is composed from the same kinds of views |
| 11 | +the rest of the product uses: headline numbers, charts, tables, lists of findings that link to |
| 12 | +each finding, a small what-if calculator, and follow-up questions you can pick with one click. |
| 13 | +When an answer suggests a change, such as marking findings as verified, it offers a button, and |
| 14 | +nothing changes until you confirm. |
| 15 | + |
| 16 | +Ask Sensei is in beta and is switched on per instance. It requires the Sensei license. Any |
| 17 | +signed-in user can ask: answers draw only on data that user can see, and an answer offers a |
| 18 | +change only on findings that user can edit. |
| 19 | + |
| 20 | +## Asking a question |
| 21 | + |
| 22 | +Open the assistant in any of three ways: |
| 23 | + |
| 24 | +- the **Ask Sensei** button in the sidebar footer; |
| 25 | +- the command palette (**Cmd+K** or **Ctrl+K**): type a question and pick **Ask Sensei**, the |
| 26 | + first result; |
| 27 | +- from a record: **Explain With Sensei** on a finding's menu, or **Summarize With Sensei** on an |
| 28 | + Asset's menu. |
| 29 | + |
| 30 | +The assistant opens in a panel on the right and stays open as you move between pages, so you |
| 31 | +can follow a link in an answer and keep the conversation in view. The page you ask from is part |
| 32 | +of the question: asked from a finding, "how risky is this?" is about that finding. |
| 33 | + |
| 34 | +Your conversations are listed under the history button in the panel. They are private: in the app, |
| 35 | +only the person who asked can open them, whatever the other person's role. Deleting a conversation removes it from your list. DefectDojo keeps it, so a change made from one of its answers stays traceable in the audit log. |
| 36 | + |
| 37 | +**Simple Answers**, at the top of the panel, asks for short, text-first answers with fewer |
| 38 | +charts. |
| 39 | + |
| 40 | +## Where the numbers come from |
| 41 | + |
| 42 | +Every number in an answer comes from your data, read with **your** permissions, at the moment |
| 43 | +you asked. Sensei looks the data up with the same queries the findings list and the dashboard |
| 44 | +widgets use, so an answer shows nothing you could not see yourself and agrees with your |
| 45 | +dashboards. |
| 46 | + |
| 47 | +Sensei never types a number into a chart or a headline tile. It chooses which query to run and |
| 48 | +which view to show; DefectDojo fills the view in from the query's result. Open **How Sensei |
| 49 | +Answered** under an answer to see every query it ran. |
| 50 | + |
| 51 | +An answer is kept as it was shown. Reopening a conversation next month shows what you saw then, |
| 52 | +not what the data says now. Ask again for current numbers. |
| 53 | + |
| 54 | +## Changing findings from an answer |
| 55 | + |
| 56 | +An answer can offer to change findings: mark them **verified**, **false positive**, **out of |
| 57 | +scope** or **mitigated**, set their severity, add a note, add tags, or push them to Jira. It |
| 58 | +offers a change only on findings its own queries returned and that you can edit. A status change |
| 59 | +is offered only on findings shown as open (and, for **verified**, not yet verified), so an |
| 60 | +answer never offers to reopen a closed finding. Clicking the button shows what will change and |
| 61 | +lists the findings by title, and nothing changes until you confirm. The change runs with your |
| 62 | +permissions, exactly like the same change made from the findings bulk-edit panel. |
| 63 | + |
| 64 | +Each change is recorded in the audit log like any other, with a marker linking it to the |
| 65 | +question that proposed it and whether that question was typed or spoken, and the answer shows |
| 66 | +that it was applied. |
| 67 | + |
| 68 | +An answer can also offer to open a page: a list such as findings, Assets or risk acceptances, |
| 69 | +the dashboard, or a record its queries returned. Ask Sensei cannot delete anything or change |
| 70 | +users, groups, roles, settings, credentials or the license. Asked to, it says so and offers to |
| 71 | +open the closest page instead. |
| 72 | + |
| 73 | +## Voice |
| 74 | + |
| 75 | +Where voice is switched on for the instance, the panel shows a microphone next to **Ask**. |
| 76 | +Press it, or **Ctrl+Shift+Space** while the panel is open, and speak a question. The words |
| 77 | +appear in the question box for you to check and edit before you press **Ask**. Turn on **Send |
| 78 | +When Recognized** to send a spoken question as soon as it is recognized. |
| 79 | + |
| 80 | +By default speech is recognized on your own computer: the audio never leaves it, and only the |
| 81 | +text of the question reaches DefectDojo. This works in Chrome and Edge on the desktop, which |
| 82 | +download a speech model for your language the first time. Other browsers show the microphone |
| 83 | +with a note that they cannot recognize speech on the device. An administrator can instead have |
| 84 | +short recordings transcribed by the instance's AI provider (Gemini on Vertex, or an |
| 85 | +OpenAI-compatible provider); the recording is sent once to that provider and is not stored. On |
| 86 | +self-hosted installations this is the `DD_ASSISTANT_VOICE_ENGINE` setting: `on_device` (the |
| 87 | +default), `provider`, or `off` to remove the microphone. |
| 88 | + |
| 89 | +The microphone listens only after you press it, for one sentence, and never while Sensei is |
| 90 | +speaking. You can also say the label of a button in the latest answer, such as "Open Top |
| 91 | +Finding", to press it: |
| 92 | + |
| 93 | +- A button that only opens a page opens it. |
| 94 | +- A change to one finding that stays in DefectDojo and is easy to undo (verifying it, setting |
| 95 | + its severity, adding a note or tags) asks you to say **confirm** or **cancel**, after reading |
| 96 | + back the change and the finding's title. Sensei listens once for the answer. |
| 97 | +- Anything else opens the confirmation dialog and waits for a click: a change to several |
| 98 | + findings, a false positive (which can spread through false-positive history), marking a finding |
| 99 | + mitigated or out of scope (which closes it, and can close its Jira issue), or a push to Jira. |
| 100 | + Voice cannot confirm these. |
| 101 | + |
| 102 | +When a spoken question's answer only takes you somewhere ("open the dashboard"), the panel |
| 103 | +goes there without a click. |
| 104 | + |
| 105 | +**Read Answers Aloud**, off by default, reads a one- or two-sentence summary of each answer with |
| 106 | +a voice installed on your computer. Every number in that summary is filled in by DefectDojo from |
| 107 | +the same queries the answer shows. Languages with no voice installed on the computer are not |
| 108 | +read aloud. |
| 109 | + |
| 110 | +## What is sent to the AI model |
| 111 | + |
| 112 | +To answer, the model is sent your question, the name of the page you asked from and the record |
| 113 | +ids on it, a short summary of the earlier questions in the conversation, and the results of the |
| 114 | +queries it runs. Those results include finding titles, severities, Asset names and, when it |
| 115 | +looks up one finding, that finding's description and mitigation text, truncated. |
| 116 | + |
| 117 | +Text that came from scanners and imports is treated as data, never as instructions. The views |
| 118 | +an answer can use are a fixed set built into DefectDojo; the model cannot add new ones, run |
| 119 | +code in your browser, load images, or add links: link syntax in an answer's text is shown as |
| 120 | +plain text, and web addresses are shown as code you can copy. To take you somewhere, an answer |
| 121 | +offers a button, and buttons only lead to pages inside DefectDojo. |
| 122 | + |
| 123 | +## Limits and cost |
| 124 | + |
| 125 | +Each instance has an allowance of answers in its license, and each person can ask a limited |
| 126 | +number of questions per hour (40 by default). One question per person is answered at a time; **Stop** cancels |
| 127 | +one in progress. Questions that fail do not count against the allowance. |
| 128 | + |
| 129 | +On self-hosted installations Ask Sensei uses the AI provider configured under |
| 130 | +[AI Model Settings](../ai_model_settings). |
0 commit comments