Source: https://github.com/aipoch/medical-research-skills
Medical Research Vector Search Skill
Skill Objective
When users ask medical research questions, intelligently rewrite queries and call the vector knowledge base to retrieve the most relevant document segments, then provide evidence-backed answers. This ensures answers come from a reliable knowledge base rather than solely from model internal knowledge.
Workflow
Step 1: Rewrite User Question into High-Quality Search Query
Before calling the API, rewrite the user's original question into a professional query suited for vector retrieval. The purpose is to improve recall, as colloquial questions often fail to match professional expressions in documents.
Rewriting principles:
- Extract core medical concepts, use standardized professional terminology
- Remove interrogative tone, convert to declarative keyword combinations
- If the original question is vague, expand to include related concepts
- Keep queries concise, focusing on key concepts (10-30 words typically works best)
Rewriting examples:
| User Original Question |
Rewritten Search Query |
| What is the review workbench? |
review workbench features usage methods |
| How to do meta-analysis? |
meta-analysis systematic review methodology statistical analysis |
| What are CAR-T cell therapy side effects? |
CAR-T cell therapy adverse reactions cytokine release syndrome neurotoxicity |
| I want to learn about CRISPR gene editing |
CRISPR-Cas9 gene editing principles applications off-target effects |
Step 2: Call Vector Database Search API
The skill directory contains a pre-packaged search script scripts/search.py - call it directly:
python scripts/search.py "<rewritten query>"
The script automatically outputs relevance scores, source titles, and document content segments.
You can also import its search() function directly in Python code:
from scripts.search import search
results = search("<rewritten query>")
API parameters (fixed, no modification needed):
| Parameter | Value | Description |
| --- | --- |
| collection_alias | wiki_production | Knowledge base to search |
| search_method | hybrid_search | Hybrid retrieval (vector + keyword) |
| alpha | 0.7 | Vector weight 70% |
| score_threshold | 0.1 | Minimum relevance threshold |
| limit | 10 | Return max 10 results |
Step 3: Parse Results and Generate Answer
- Prioritize organizing answers based on high-relevance documents (score > 0.3)
- Use
[1], [2] citation markers in the text (merge numbers when multiple passages cite the same document)
- List all citations at the end in reference format using Markdown hyperlinks, with
helix_wiki_knowledge_name as link text and helix_wiki_node_url as URL:
**References**
[1] [Protein-Protein Interaction Research - Basic Research Elements](https://helixwiki.newidea.pro/xxx)
[2] [Introduction to Research Design - Basic Scientific Research Elements and Logic](https://helixwiki.newidea.pro/yyy)
URL comes from the child_chunks[0].properties.metadata.helix_wiki_node_url field in each API result.
- If different results share the same URL, merge into a single reference entry
- If relevance is low or results are insufficient, honestly state this and supplement with model knowledge (without citation markers)
Example Use Cases
- Research platform feature usage (e.g., review workbench, literature management)
- Medical literature search and review methodology
- Clinical trial design and statistical methods
- Drug mechanisms of action and side effects
- Disease diagnosis and treatment guidelines
- Biomedical experimental techniques (PCR, sequencing, flow cytometry, etc.)
- Bioinformatics analysis methods
- Medical writing and submission guidelines
Important Notes
- Never directly answer complex medical research questions without searching first — search-then-answer is the core value of this skill
- For very basic common knowledge questions (e.g., 'what is DNA'), a brief direct answer is acceptable, but deep questions must always be searched
- If first search results are unsatisfactory, try changing the query angle — e.g., switch to English terminology or split into multiple sub-queries
When to Use
- Use this skill when the user explicitly needs to perform the core task of medical-vector-search and has provided the minimum executable input.
- Use this skill when you need a structured deliverable rather than general advice.
- Use this skill when the current task can be completed using this skill's bundled scripts, templates, or reference materials.
When Not to Use
- Do not proceed when required input files, identifiers, parameters, or context are missing — ask the user to provide them first.
- Do not assume capabilities beyond this skill's declared scope when the user requests external operations or inferences.
- Do not proceed without user confirmation when overwriting existing results, executing high-cost batch operations, or expanding task scope.
Required Inputs
| Field |
Required |
Format/Source |
Example |
If Missing |
| User task description |
Yes |
Text |
Research question, writing goal, analysis objective |
Stop and ask user to provide |
| Primary input material |
Depends on task |
Text, file path, ID, table, or literature |
PMID, PDF, CSV, DOCX, keywords, etc. |
Specify which material type is missing |
| Output preference |
No |
Text |
Language, format, target journal, template |
Use skill default format |
Output Contract
- Primary output: Structured result or target file aligned with this skill's objective.
- Optional output: Intermediate check notes, issue list, supplementary suggestions, or generated file paths.
- Format requirement: Unless the user specifies otherwise, prefer stable, reviewable Markdown or JSON; if the skill's bundled script requires a fixed format, use that format.
- If partially complete: Must explicitly mark as PARTIAL and state which steps are completed and which remain.
Failure Handling
- Missing critical input: Explicitly state which fields, files, or identifiers are missing and pause.
- Script, template, or resource execution failure: Report the failing step, likely cause, and recovery suggestions — do not silently degrade.
- Partial completion only: Return the verified portion first, then list remaining blockers and suggested next steps.
User Checkpoints
- Before executing batch processing, overwriting files, long-running searches, or multi-stage generation, confirm scope and output format with the user.
- Before proceeding when a key judgment is ambiguous, evidence is insufficient, or the workflow is entering the next stage, confirm with the user.
Input Validation
This skill accepts requests that match the documented purpose of medical-vector-search and include enough context to complete the workflow safely.
Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:
medical-vector-search only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.
Quick Validation
- Check that key scripts, templates, or reference file paths this skill depends on exist.
- Check that the final output contains the core fields, sections, or files specified for this task.
- Check that results clearly mark assumptions, limitations, and incomplete items.
1---2name: medical-vector-search3description: Vector database retrieval and evidence-based answering for medical research topics. Use when users need knowledge-base-backed answers about methodology, disease mechanisms, drug effects, clinical research, or research tools. Input is a medical research question; output is a st...4license: MIT5---6> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)
7
8
9# Medical Research Vector Search Skill
10
11## Skill Objective
12
13When users ask medical research questions, intelligently rewrite queries and call the vector knowledge base to retrieve the most relevant document segments, then provide evidence-backed answers. This ensures answers come from a reliable knowledge base rather than solely from model internal knowledge.
14
15## Workflow
16
17### Step 1: Rewrite User Question into High-Quality Search Query
18
19Before calling the API, rewrite the user's original question into a professional query suited for vector retrieval. The purpose is to improve recall, as colloquial questions often fail to match professional expressions in documents.
20
21**Rewriting principles:**
22
23- Extract core medical concepts, use standardized professional terminology
24- Remove interrogative tone, convert to declarative keyword combinations
25- If the original question is vague, expand to include related concepts
26- Keep queries concise, focusing on key concepts (10-30 words typically works best)
27
28**Rewriting examples:**
29
30| User Original Question | Rewritten Search Query |
31| --- | --- |
32| What is the review workbench? | review workbench features usage methods |
33| How to do meta-analysis? | meta-analysis systematic review methodology statistical analysis |
34| What are CAR-T cell therapy side effects? | CAR-T cell therapy adverse reactions cytokine release syndrome neurotoxicity |
35| I want to learn about CRISPR gene editing | CRISPR-Cas9 gene editing principles applications off-target effects |
36
37### Step 2: Call Vector Database Search API
38
39The skill directory contains a pre-packaged search script `scripts/search.py` - call it directly:
40
41```bash
42python scripts/search.py "<rewritten query>"
43```
44
45The script automatically outputs relevance scores, source titles, and document content segments.
46
47You can also import its `search()` function directly in Python code:
48
49```python
50from scripts.search import search
51
52results = search("<rewritten query>")
53```
54
55**API parameters (fixed, no modification needed):**
56
57| Parameter | Value | Description |
58| --- | --- |
59| `collection_alias` | `wiki_production` | Knowledge base to search |
60| `search_method` | `hybrid_search` | Hybrid retrieval (vector + keyword) |
61| `alpha` | `0.7` | Vector weight 70% |
62| `score_threshold` | `0.1` | Minimum relevance threshold |
63| `limit` | `10` | Return max 10 results |
64
65### Step 3: Parse Results and Generate Answer
66
67- Prioritize organizing answers based on high-relevance documents (score > 0.3)
68- Use `[1]`, `[2]` citation markers in the text (merge numbers when multiple passages cite the same document)
69- List all citations at the end in reference format using Markdown hyperlinks, with `helix_wiki_knowledge_name` as link text and `helix_wiki_node_url` as URL:
70
71```markdown
72**References**
73[1] [Protein-Protein Interaction Research - Basic Research Elements](https://helixwiki.newidea.pro/xxx)
74[2] [Introduction to Research Design - Basic Scientific Research Elements and Logic](https://helixwiki.newidea.pro/yyy)
75```
76
77URL comes from the `child_chunks[0].properties.metadata.helix_wiki_node_url` field in each API result.
78
79- If different results share the same URL, merge into a single reference entry
80- If relevance is low or results are insufficient, honestly state this and supplement with model knowledge (without citation markers)
81
82## Example Use Cases
83
84- Research platform feature usage (e.g., review workbench, literature management)
85- Medical literature search and review methodology
86- Clinical trial design and statistical methods
87- Drug mechanisms of action and side effects
88- Disease diagnosis and treatment guidelines
89- Biomedical experimental techniques (PCR, sequencing, flow cytometry, etc.)
90- Bioinformatics analysis methods
91- Medical writing and submission guidelines
92
93## Important Notes
94
95- Never directly answer complex medical research questions without searching first — search-then-answer is the core value of this skill
96- For very basic common knowledge questions (e.g., 'what is DNA'), a brief direct answer is acceptable, but deep questions must always be searched
97- If first search results are unsatisfactory, try changing the query angle — e.g., switch to English terminology or split into multiple sub-queries
98
99## When to Use
100
101- Use this skill when the user explicitly needs to perform the core task of medical-vector-search and has provided the minimum executable input.
102- Use this skill when you need a structured deliverable rather than general advice.
103- Use this skill when the current task can be completed using this skill's bundled scripts, templates, or reference materials.
104
105## When Not to Use
106
107- Do not proceed when required input files, identifiers, parameters, or context are missing — ask the user to provide them first.
108- Do not assume capabilities beyond this skill's declared scope when the user requests external operations or inferences.
109- Do not proceed without user confirmation when overwriting existing results, executing high-cost batch operations, or expanding task scope.
110
111## Required Inputs
112
113| Field | Required | Format/Source | Example | If Missing |
114|---|---|---|---|---|
115| User task description | Yes | Text | Research question, writing goal, analysis objective | Stop and ask user to provide |
116| Primary input material | Depends on task | Text, file path, ID, table, or literature | PMID, PDF, CSV, DOCX, keywords, etc. | Specify which material type is missing |
117| Output preference | No | Text | Language, format, target journal, template | Use skill default format |
118
119## Output Contract
120
121- Primary output: Structured result or target file aligned with this skill's objective.
122- Optional output: Intermediate check notes, issue list, supplementary suggestions, or generated file paths.
123- Format requirement: Unless the user specifies otherwise, prefer stable, reviewable Markdown or JSON; if the skill's bundled script requires a fixed format, use that format.
124- If partially complete: Must explicitly mark as PARTIAL and state which steps are completed and which remain.
125
126## Failure Handling
127
128- Missing critical input: Explicitly state which fields, files, or identifiers are missing and pause.
129- Script, template, or resource execution failure: Report the failing step, likely cause, and recovery suggestions — do not silently degrade.
130- Partial completion only: Return the verified portion first, then list remaining blockers and suggested next steps.
131
132## User Checkpoints
133
134- Before executing batch processing, overwriting files, long-running searches, or multi-stage generation, confirm scope and output format with the user.
135- Before proceeding when a key judgment is ambiguous, evidence is insufficient, or the workflow is entering the next stage, confirm with the user.
136
137
138## Input Validation
139
140This skill accepts requests that match the documented purpose of `medical-vector-search` and include enough context to complete the workflow safely.
141
142Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:
143
144> `medical-vector-search` only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.
145
146## Quick Validation
147
148- Check that key scripts, templates, or reference file paths this skill depends on exist.
149- Check that the final output contains the core fields, sections, or files specified for this task.
150- Check that results clearly mark assumptions, limitations, and incomplete items.