knowledge-query
/knowledge-query
Wyszukuje hybrydowo (wektory i BM25 z RRF oraz wzmocnienie metadanych) w bazie Knowledge na pgvector, opcjonalnie z syntezą RAG i cytowaniami zamiast surowych fragmentów.
- Repozytorium
- evo-nexus ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 12.05.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 12.05.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Wyszukuje hybrydowo (wektory i BM25 z RRF oraz wzmocnienie metadanych) w bazie Knowledge na pgvector, opcjonalnie z syntezą RAG i cytowaniami zamiast surowych fragmentów.
Wyzwalacze z opisu
Oryginalny opis (EN)
Hybrid search (vector + BM25 via RRF + metadata boost) against the pgvector Knowledge base, with optional RAG synthesis. Use when the user asks factual questions that should be grounded in indexed documents (e.g., 'what do we know about X', 'search the knowledge base for Y', '@knowledge <query>'). Pass answer=true to synthesize a narrative response with citations instead of raw snippets.
Jak działa
- When to trigger
- Arguments
- Workflow
- Output
- Actionable failures
Podgląd SKILL.md
---
name: knowledge-query
description: "Hybrid search (vector + BM25 via RRF + metadata boost) against the pgvector Knowledge base, with optional RAG synthesis. Use when the user asks factual questions that should be grounded in indexed documents (e.g., 'what do we know about X', 'search the knowledge base for Y', '@knowledge <query>'). Pass answer=true to synthesize a narrative response with citations instead of raw snippets."
---
# knowledge-query
Group: **Consumption**. Hybrid search on pgvector + optional RAG (LLM synthesis with citations).
## When to trigger
- "What do we know about X?"
- "Search the knowledge base for Y"
- "@knowledge <query>"
- Any factual question that should be grounded in indexed documents
## Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| `query` | str | required | Natural language question |
| `connection` | str | first `ready` | Connection slug (e.g., "academy", "acme") |
| `space` | str | null = all | Space slug within the connection |
| `top_k` | int | 5 | How many snippets to return |
| `filters` | dict | {} | `{unit_id, content_type, topics, date_range}` |
| `answer` | bool | false | If true, synthesize narrative answer with citations |
## Workflow
### Step 1 — Identify active connection
If `connection` is not provided, call `GET /api/knowledge/connections?status=ready` and use the first one. If none ready: return actionable error: "No Knowledge connection configured. Run `knowledge-admin action=connect` first."
### Step 2 — Hybrid search
```python
from dashboard.backend.sdk_client import evo
hits = evo.post(
"/api/knowledge/v1/search",
{"query": query, "space": space, "top_k": top_k, "filters": filters},
headers={"X-Knowledge-Connection": connection},
)
```
Response: list of `{chunk_id, content, document_id, title, content_type, similarity_score, metadata: {page, section, heading_path}}`.
### Step 3a — Format snippets (if `answer=false`)
For each hit:
```
**[{content_type}]** {title} — p.{metadata.page or "?"}
> {content[:300]}...
Score: {similarity_score:.3f}
```
Separate with `---`.
### Step 3b — RAG synthesis (if `answer=true`)
1. Take top-5 snippets
2. Build prompt:
```
You are a factual assistant. Answer ONLY using the sources below.
Cite each fact with [source:page] right after the claim.
If sources don't cover the question: "The knowledge base contains no information on this."
### Question
{query}
### Sources
[1] {title_1} (p.{page_1}): {content_1}
[2] {title_2} (p.{page_2}): {content_2}
...
### Answer
```
3. Call Claude Haiku 4.5 via `anthropic` SDK (`ANTHROPIC_API_KEY` from `.env`). Model: `claude-haiku-4-5-20251001`. Max tokens: 800.
4. Render response + sources block at the end.
## Output
- `answer=false`: markdown list of snippets with scores
- `answer=true`: narrative answer + sources
- Always: footer `Searched {N} chunks in {connection}/{space or "all"} in {elapsed_ms}ms`
## Actionable failures
- Connection not found → "Connection `X` does not exist. Run `knowledge-admin action=health`."
- Space not found → list available spaces
- 0 hits → suggest relaxing filters
- `ANTHROPIC_API_KEY` missing with `answer=true` → fallback to raw snippets + warning
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · evolution-foundation/evo-nexus | 100 | Apache-2.0 |
| cogni-work/insight-wave | 100 | Apache-2.0 |
Migawka bazy z 28.10.2026 · wersja paczki 14ef9dca4291 (skrót SHA-256 całej paczki)
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100build-rag-pipeline
Pomaga zbudować odpowiedzi RAG nad własnymi dokumentami: chunking świadomy struktury, przypięte embeddingi w pgvector, wyszukiwanie hybrydowe z RRF, izolacja tenantów, cytowania, ścieżka „nie wiem” i ewaluacja retrievalu. - 100zeabur-rag-search
Przeszukuje bazę wiedzy RAG hybrydowo, semantycznie i BM25, zanim odpowie na pytania techniczne lub zweryfikuje aktualne informacje. - 100retrieval-stinger
Projektuje i audytuje wyszukiwanie: full-text, recall w pgvector, hybrydowa fuzja RRF, reranking, chunking i ewaluacja jakości recall. - 100knowledge-rag
Dodaje i aktualizuje wpisy TerMinal Knowledge Base oparte na lokalnym serwerze MCP knowledge-rag: wyszukiwanie semantyczne po dokumentach, wczytywanie URL i dokumentów oraz konfiguracja typu wpisu RAG. - 100rag-architect
Uruchamia agenta RAG-Architect do budowy systemów pytań i odpowiedzi nad dokumentami w Pythonie z Chroma, Pinecone lub pgvector, wyszukiwaniem hybrydowym, rerankingiem i cytowaniem źródeł. - 98vector-search-patterns
Wdraża wyszukiwanie wektorowe: generowanie embeddingów, dobór indeksu i wyszukiwanie hybrydowe w ChromaDB, pgvector i FAISS oraz projekt potoku RAG.