File size: 3,015 Bytes
2213648
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Advanced RAG System</title>
    <link rel="stylesheet" href="styles.css">
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
</head>
<body>
    <div class="container">
        <!-- Header -->
        <header>
            <h1>Advanced RAG System</h1>
            <p>Retrieval-Augmented Generation for Intelligent Responses</p>
        </header>

        <!-- Main Content -->
        <main>
            <!-- Query Input Section -->
            <section class="query-section">
                <h2>Ask a Question</h2>
                <textarea id="query-input" placeholder="Type your question here..." rows="4"></textarea>
                <button id="submit-query">Generate Response</button>
            </section>

            <!-- Response Section -->
            <section class="response-section">
                <h2>Generated Response</h2>
                <div id="response-output" class="output-box">
                    <p>Your AI-generated response will appear here.</p>
                </div>
            </section>

            <!-- Retrieved Context Section -->
            <section class="context-section">
                <h2>Retrieved Context</h2>
                <div id="context-output" class="output-box">
                    <p>Relevant documents and context used for generation will be displayed here.</p>
                </div>
            </section>

            <!-- Settings Panel -->
            <aside class="settings-panel">
                <h2>RAG Settings</h2>
                <div class="setting">
                    <label for="model-select">Model:</label>
                    <select id="model-select">
                        <option value="gemini-2.0-flash">Gemini 2.0 Flash</option>
                        <option value="custom-rag">Custom RAG Model</option>
                    </select>
                </div>
                <div class="setting">
                    <label for="top-k">Top-K Retrieval:</label>
                    <input type="number" id="top-k" value="5" min="1" max="20">
                </div>
                <div class="setting">
                    <label for="temperature">Temperature:</label>
                    <input type="number" id="temperature" value="0.7" step="0.1" min="0" max="1">
                </div>
                <div class="setting">
                    <label for="context-length">Context Length:</label>
                    <input type="number" id="context-length" value="512" min="128" max="2048">
                </div>
                <button id="apply-settings">Apply Settings</button>
            </aside>
        </main>

        <!-- Footer -->
        <footer>
            <p>&copy; 2025 Advanced RAG System. Powered by xAI.</p>
        </footer>
    </div>
    <script src="script.js"></script>
</body>
</html>