Add Deep Research tool — agent + rank/rerank RAG
New surface at /deep-research.php where the user pastes a question or uploads PDF/DOCX/TXT case files and a LLM-orchestrated agent researches the Do Better Norge legal corpus from 3-5 angles, with hybrid retrieval, cross-encoder rerank, and synthesis that emits an inline-[n]-cited markdown brief plus a numbered sources panel. Uploaded documents are chunked + embedded in memory only (nomic-embed-text via LiteLLM) and searched alongside the shared corpus during the same request — never persisted to disk, DB, or Qdrant. Reuses ClientRagPipeline::searchAll (hybrid + rerank), dbnV6 slice helpers, and the existing extract.php text-extraction logic via a new dbnToolsExtractUploadedFile() helper. Also adds dbnToolsCallGpuLlm() helper in bootstrap.php — fixes a latent bug where LegalTools.php was already calling that name with no definition. Search.php is unchanged.
This commit is contained in:
@@ -91,7 +91,7 @@ if (dbnToolsIsAuthenticated()) {
|
||||
|
||||
<section class="cap-section">
|
||||
<div class="section-inner">
|
||||
<h2 class="section-heading">Six tools, one suite</h2>
|
||||
<h2 class="section-heading">Seven tools, one suite</h2>
|
||||
<div class="cap-grid">
|
||||
<div class="cap-card">
|
||||
<span class="cap-label">Ask</span>
|
||||
@@ -103,6 +103,11 @@ if (dbnToolsIsAuthenticated()) {
|
||||
<h3>Search</h3>
|
||||
<p>Retrieve up to seven relevant legal sources with titles, sections, and excerpts.</p>
|
||||
</div>
|
||||
<div class="cap-card">
|
||||
<span class="cap-label">Deep research</span>
|
||||
<h3>Deep research</h3>
|
||||
<p>Upload a case file or paste a question. An agent expands it into 3–5 angles, runs hybrid rank/rerank RAG across the corpus + your upload, and returns a cited brief.</p>
|
||||
</div>
|
||||
<div class="cap-card">
|
||||
<span class="cap-label">Summarize</span>
|
||||
<h3>Summarize</h3>
|
||||
|
||||
Reference in New Issue
Block a user