[Developer] #569 plain text vector Top-K probe

This commit is contained in:
devmrko
2026-06-30 13:23:49 +09:00
parent 084c5e59cf
commit cde5266a77
9 changed files with 266 additions and 20 deletions

View File

@@ -2,6 +2,8 @@
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<body>
<div th:fragment="result" class="probe-result-flow">
<div class="alert alert-danger" th:if="${errorMessage}" th:text="${errorMessage}"></div>
<th:block th:if="${result}">
<div class="section-heading">
<div>
<span class="architecture-kicker">검증 결론</span>
@@ -58,7 +60,43 @@
</div>
</div>
<div class="table-responsive mt-3" th:if="${!#lists.isEmpty(result.rows())}">
<div class="vector-result-panel mt-3"
th:if="${vectorSearch and !#lists.isEmpty(result.rows())}">
<div class="section-heading compact-heading">
<div>
<h3>벡터 검색 Top-K</h3>
<p class="section-subtitle">거리(SCORE)가 낮은 순서로 VPD를 통과한 검색 단위를 반환했습니다.</p>
</div>
<span class="badge text-bg-light" th:text="${'K=' + result.rowCount()}">K=0</span>
</div>
<p class="form-hint" th:text="${'검색어: ' + vectorQuery + ' · 임베딩: ' + vectorEmbeddingMode + ' · 모델: ' + vectorEmbeddingModel}">검색 정보</p>
<div class="table-responsive mt-3">
<table class="table table-sm align-middle">
<thead>
<tr>
<th>검색 단위 ID</th>
<th>자료 ID</th>
<th>제목</th>
<th>기술 태그</th>
<th>벡터 거리 (SCORE)</th>
<th>본문</th>
</tr>
</thead>
<tbody>
<tr th:each="row : ${result.rows()}">
<td th:text="${row['CHUNK_ID'] ?: row['chunk_id']}">28001</td>
<td th:text="${row['DOCUMENT_ID'] ?: row['document_id']}">knowledge-001</td>
<td th:text="${row['TITLE'] ?: row['title']}">제목</td>
<td><code th:text="${row['TECH_TAG'] ?: row['tech_tag']}">ORDS</code></td>
<td th:text="${row['SCORE'] ?: row['score']}">0.01</td>
<td class="matrix-list" th:text="${row['CHUNK_TEXT'] ?: row['chunk_text']}">본문</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="table-responsive mt-3" th:if="${!vectorSearch and !#lists.isEmpty(result.rows())}">
<table class="table table-sm table-striped align-middle">
<thead><tr><th th:each="column : ${result.columns()}" th:text="${column}">column</th></tr></thead>
<tbody>
@@ -120,6 +158,7 @@
<section class="probe-exchange"><h3>Response Body</h3><pre th:text="${result.responseBody()} ?: ''"></pre></section>
</div>
</details>
</th:block>
</div>
</body>
</html>

View File

@@ -67,10 +67,18 @@
<span class="form-hint">권한 판정에는 영향을 주지 않고 화면에 가져올 최대 행만 제한합니다.</span>
</label>
<label class="span-2 vector-probe-input" data-vector-probe-input hidden>
벡터 검색 요청 본문 (JSON)
<textarea class="form-control" name="requestBody" rows="3" disabled
placeholder='{"embedding":[0.10,0.20,0.30,0.40]}'></textarea>
<span class="form-hint">벡터 검색 객체를 선택했을 때만 필요합니다. 검색어를 외부 임베딩 모델로 바꾼 배열을 넣습니다.</span>
벡터 검색어 (평문)
<textarea class="form-control" name="requestBody" rows="3" required disabled
placeholder="예: Oracle VPD에서 ORDS 권한을 적용하는 방법"></textarea>
<span class="form-hint">검색어를 평문으로 입력하면 백오피스가 같은 임베딩 방식으로 벡터화해 전용 ORDS Handler에 전달합니다.</span>
</label>
<label class="vector-probe-input" data-vector-probe-input hidden>
임베딩 방식
<select class="form-select" name="embeddingMode" disabled>
<option value="DEMO">로컬 임베딩(개발용)</option>
<option value="AI" th:disabled="${!aiEmbeddingConfigured}">AI 임베딩</option>
</select>
<span class="form-hint">자료 등록 때 사용한 방식·차원과 맞춰야 합니다. AI 설정이 없으면 로컬 임베딩을 사용하세요.</span>
</label>
<button class="btn rw-btn-primary probe-submit" type="submit">3. 권한 결과 확인</button>
</form>