segment-search

Search OCR chunks in OpenSearch using hybrid BM25 and vector methods.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Stream-claims/stream-engineering --skill segment-search
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: segment-search
Source: https://github.com/Stream-claims/stream-engineering/tree/main/skills/segment-search
Command: npx skills add https://github.com/Stream-claims/stream-engineering --skill segment-search

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, opensearch-py, requests-aws4auth, boto3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables efficient searching and retrieval of specific information within large volumes of unstructured medical record text, overcoming the limitations of keyword-based searches.

Core Features & Use Cases

  • Hybrid Search: Combines keyword (BM25) and vector (semantic) search for highly relevant results.
  • Medical Record Analysis: Quickly find mentions of conditions, treatments, or specific data points across patient files.
  • RAG Index Querying: Directly query a RAG index for contextual information.

Quick Start

Search for mentions of 'diabetes' within the medical records for case ID 'CASE_123'.

Frequently Asked Questions about segment-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search OCR chunks in OpenSearch using semantic and keyword matching?

Hybrid search of OCR chunks in OpenSearch combines BM25 keyword matching with OpenAI vector embeddings to retrieve semantically relevant segments from unstructured text data.

What is the best way to find specific conditions or treatments in unstructured medical records?

Finding specific conditions in unstructured medical records is best handled by querying a RAG index with hybrid search, which combines keyword and semantic retrieval to locate relevant mentions across patient files.

Does this hybrid search approach work with existing OpenSearch RAG indexes?

Yes, the hybrid search approach works directly with existing OpenSearch RAG indexes. It queries your OCR data by leveraging OpenAI embeddings and OpenSearch BM25 keyword search for efficient contextual retrieval.

Do I need OpenAI and OpenSearch to query medical record segments?

Yes, you need OpenAI for generating vector embeddings and OpenSearch for indexing and querying data. These dependencies enable the hybrid BM25 and vector retrieval needed to search medical record segments.

Why use hybrid BM25 and vector search instead of keyword-only search for OCR data?

Hybrid BM25 and vector search overcomes limitations of keyword-only search for OCR data by adding semantic matching. This combination ensures highly relevant retrieval from unstructured medical records that may have OCR errors or varied phrasing.