Medical vector search

From aipoch/medical-research-skills · View interactive version

Medical vector search is an AI agent skill from the GitHub repository aipoch/medical-research-skills. 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...

How to use this skill

Skill file

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:

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

**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.

Example Use Cases

Important Notes

When to Use

When Not to Use

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

Failure Handling

User Checkpoints

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.