From 1bb48b9818598b8f0ca5326d4151d5629e5c0697 Mon Sep 17 00:00:00 2001 From: Santosh Bhavani Date: Sun, 19 Oct 2025 19:57:15 -0700 Subject: [PATCH] feat(component): add LLM selector to RAG query interface - Integrate LLMSelectorCompact into RAG query component - Make query mode cards more compact to accommodate LLM selector - Update styling for better space utilization - Add LLM selection section with descriptive label --- .../assets/frontend/components/rag-query.tsx | 62 +++++++++++-------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/nvidia/txt2kg/assets/frontend/components/rag-query.tsx b/nvidia/txt2kg/assets/frontend/components/rag-query.tsx index cc17ec0..9f6333c 100644 --- a/nvidia/txt2kg/assets/frontend/components/rag-query.tsx +++ b/nvidia/txt2kg/assets/frontend/components/rag-query.tsx @@ -1,6 +1,7 @@ import { useState, useEffect } from "react"; import { Triple } from "@/types/graph"; import { Search as SearchIcon, Zap, Database, Cpu } from "lucide-react"; +import { LLMSelectorCompact } from "./llm-selector-compact"; interface RagQueryProps { onQuerySubmit: (query: string, params: RagParams) => Promise; @@ -124,14 +125,14 @@ export function RagQuery({ {/* Query Type Selection */} -
-

Select Query Type

-
+
+

Select Query Type

+
@@ -176,7 +177,7 @@ export function RagQuery({ type="button" onClick={() => handleQueryModeChange('vector-search')} disabled={!vectorEnabled} - className={`relative flex flex-col items-center p-4 border rounded-xl transition-all duration-200 hover:shadow-md ${ + className={`relative flex flex-col items-center p-3 border rounded-lg transition-all duration-200 hover:shadow-md ${ queryMode === 'vector-search' ? 'border-nvidia-green bg-nvidia-green/10 text-nvidia-green shadow-sm' : vectorEnabled @@ -184,23 +185,32 @@ export function RagQuery({ : 'border-border/30 opacity-50 cursor-not-allowed' }`} > -
- +
+
- GraphRAG - - Uses G-Retriever - RAG + GNN + GraphRAG + + RAG + GNN -
- New +
+ NEW
{queryMode === 'vector-search' && ( -
+
)}
+ {/* LLM Selection */} +
+
+

LLM Model

+

Select the LLM for answer generation

+
+ +
+