Multi-Source Search Strategy
Plan, execute, and refine search strategies for complex enterprise queries that span multiple tools and require iterative refinement.
Strategy Planning Process
Step 1: Analyze the Query
Break down the user's question into searchable components:
| Component |
Description |
Example |
| Core concepts |
Primary topics or entities |
"authentication", "SSO" |
| Qualifiers |
Narrowing attributes |
"for mobile app", "in Q3" |
| Entity types |
People, projects, teams, dates |
"by security team", "Project X" |
| Intent |
What the user actually needs |
Decision history, how-to, status |
| Time constraints |
Recency requirements |
"last month", "current" |
Step 2: Select Target Sources
Evaluate which sources are most likely to contain relevant results:
| Source Type |
Best For |
Query Style |
| Email |
Decisions, approvals, external communication |
People + topic |
| Chat / Slack |
Quick decisions, links, informal context |
Channel + keywords |
| Documents |
Specs, proposals, formal write-ups |
Title + content |
| Wiki |
Processes, architecture, onboarding, policies |
Topic + category |
| Tickets / Issues |
Implementation details, bugs, requirements |
Labels + text |
| Code |
Technical implementation, comments, configs |
Symbol + file path |
| Calendar |
Meeting context, attendees, scheduling |
People + date range |
Source selection matrix:
| Query Intent |
Primary Sources |
Secondary Sources |
| "How does X work?" |
Wiki, Docs, Code |
Tickets, Chat |
| "What was decided?" |
Email, Chat, Docs |
Tickets, Wiki |
| "Who is responsible?" |
Tickets, Wiki, Chat |
Email, Calendar |
| "What is the status?" |
Tickets, Chat, Email |
Docs, Calendar |
| "When did X happen?" |
Email, Chat, Tickets |
Docs, Calendar |
| "Why was X done?" |
Email, Chat, Docs |
Tickets, Code |
Step 3: Formulate Sub-Queries
Transform the original query into source-specific sub-queries:
Original: "Why did we switch from Redis to DynamoDB for session storage?"
Sub-queries:
1. Wiki → "session storage" OR "DynamoDB" OR "Redis migration"
2. Docs → "session" AND ("DynamoDB" OR "Redis") — type:proposal OR type:design-doc
3. Email → "session storage" OR "Redis replacement" — from:engineering-leads
4. Chat → "DynamoDB sessions" OR "Redis sessions" — channels:#backend,#architecture
5. Tickets → labels:infrastructure "session" AND ("Redis" OR "DynamoDB")
6. Code → path:*session* OR path:*config* "dynamodb" — recent commits
Step 4: Define Execution Plan
# Search Execution Plan
## Query: [original query]
## Decomposition:
- Concept A: [term variations and synonyms]
- Concept B: [term variations and synonyms]
- Filter: [time range, people, teams]
## Execution Order:
1. [High-priority source] — [specific query] — Expected: [what we hope to find]
2. [Medium-priority source] — [specific query] — Expected: [what we hope to find]
3. [Lower-priority source] — [specific query] — Expected: [what we hope to find]
## Refinement Triggers:
- If Step 1 finds [X], narrow Step 2 to [Y]
- If Step 1 finds nothing, broaden Step 2 to [Z]
- If conflicting results, add Step 4: [verification query]
Step 5: Execute and Merge Results
Result Ranking Framework
Score each result on four dimensions:
| Dimension |
Weight |
Criteria |
| Relevance |
40% |
How directly it answers the query |
| Authority |
25% |
Source reliability, author expertise, formality level |
| Recency |
20% |
How current the information is |
| Uniqueness |
15% |
Does it add information not found in other results |
Composite score: (Relevance * 0.4) + (Authority * 0.25) + (Recency * 0.2) + (Uniqueness * 0.15)
Output Format
# Search Strategy Report
Query: [original question]
Sources searched: [N] | Results found: [N] | Top results: [N]
## Search Plan Executed
| Step | Source | Query Used | Results |
|------|----------|-------------------------------|---------|
| 1 | [Source] | [query] | [N] |
| 2 | [Source] | [query] | [N] |
## Top Results (Ranked)
### 1. [Result Title] — [Source] — Score: [X/10]
- **Relevance**: [why this matches]
- **Key excerpt**: "[relevant quote]"
- **Date**: [date] | **Author**: [author]
### 2. [Result Title] — [Source] — Score: [X/10]
- **Relevance**: [why this matches]
- **Key excerpt**: "[relevant quote]"
- **Date**: [date] | **Author**: [author]
## Answer Summary
[Synthesized answer based on top results]
## Search Refinement Suggestions
- To find more: try [broader query suggestion]
- To narrow down: add [filter suggestion]
- Unexplored sources: [sources not yet queried and why they might help]
Query Optimization Techniques
| Technique |
When to Use |
Example |
| Synonym expansion |
Initial search yields few results |
"auth" → "authentication", "login" |
| Phrase matching |
Too many irrelevant results |
"session storage" (exact phrase) |
| Author filtering |
Known domain experts exist |
from:jane.doe OR from:john.smith |
| Date narrowing |
Topic changed over time |
after:2025-01-01 |
| Negative filtering |
Known false positives |
NOT "session recording" |
| Channel scoping |
Known relevant channels |
in:#backend-eng |
| Label/tag filtering |
Structured metadata available |
label:architecture, tag:approved |
Iterative Refinement
After initial results, determine if refinement is needed:
- Too many results (>50): Add filters, use phrase matching, narrow date range
- Too few results (<3): Expand synonyms, broaden date range, add sources
- Wrong results: Analyze why results are off-topic, add negative filters
- Partial answer: Identify the gap and formulate a targeted follow-up query
Edge Cases
- Ambiguous queries: Ask the user to clarify before executing; present 2-3 interpretations
- No results anywhere: Suggest the information may not exist in connected sources; recommend who to ask
- Cross-language content: Note if sources contain content in multiple languages; expand queries accordingly
- Acronyms and jargon: Expand acronyms in queries and search for both forms
- Stale indexes: If a source's index is known to be delayed, warn about potential missing recent items
Quality Checklist
1---2name: search-strategy3description: Plan and execute a multi-source search strategy for complex queries that require searching across multiple enterprise tools with different query syntaxes, filters, and relevance models. Decomposes broad questions into targeted sub-queries and merges results into a ranked answer set. TRIGGER when: user asks to plan a search, needs help finding something complex, wants a search strategy, asks "how should I search for X", or has a multi-faceted research question.4---56# Multi-Source Search Strategy78Plan, execute, and refine search strategies for complex enterprise queries that span multiple tools and require iterative refinement.910## Strategy Planning Process1112### Step 1: Analyze the Query1314Break down the user's question into searchable components:1516| Component | Description | Example |17|--------------------|------------------------------------------------|----------------------------------|18| Core concepts | Primary topics or entities | "authentication", "SSO" |19| Qualifiers | Narrowing attributes | "for mobile app", "in Q3" |20| Entity types | People, projects, teams, dates | "by security team", "Project X" |21| Intent | What the user actually needs | Decision history, how-to, status|22| Time constraints | Recency requirements | "last month", "current" |2324### Step 2: Select Target Sources2526Evaluate which sources are most likely to contain relevant results:2728| Source Type | Best For | Query Style |29|------------------|---------------------------------------------------|----------------------|30| Email | Decisions, approvals, external communication | People + topic |31| Chat / Slack | Quick decisions, links, informal context | Channel + keywords |32| Documents | Specs, proposals, formal write-ups | Title + content |33| Wiki | Processes, architecture, onboarding, policies | Topic + category |34| Tickets / Issues | Implementation details, bugs, requirements | Labels + text |35| Code | Technical implementation, comments, configs | Symbol + file path |36| Calendar | Meeting context, attendees, scheduling | People + date range |3738Source selection matrix:3940| Query Intent | Primary Sources | Secondary Sources |41|-------------------------|-------------------------|-----------------------|42| "How does X work?" | Wiki, Docs, Code | Tickets, Chat |43| "What was decided?" | Email, Chat, Docs | Tickets, Wiki |44| "Who is responsible?" | Tickets, Wiki, Chat | Email, Calendar |45| "What is the status?" | Tickets, Chat, Email | Docs, Calendar |46| "When did X happen?" | Email, Chat, Tickets | Docs, Calendar |47| "Why was X done?" | Email, Chat, Docs | Tickets, Code |4849### Step 3: Formulate Sub-Queries5051Transform the original query into source-specific sub-queries:5253```54Original: "Why did we switch from Redis to DynamoDB for session storage?"5556Sub-queries:571. Wiki → "session storage" OR "DynamoDB" OR "Redis migration"582. Docs → "session" AND ("DynamoDB" OR "Redis") — type:proposal OR type:design-doc593. Email → "session storage" OR "Redis replacement" — from:engineering-leads604. Chat → "DynamoDB sessions" OR "Redis sessions" — channels:#backend,#architecture615. Tickets → labels:infrastructure "session" AND ("Redis" OR "DynamoDB")626. Code → path:*session* OR path:*config* "dynamodb" — recent commits63```6465### Step 4: Define Execution Plan6667```68# Search Execution Plan6970## Query: [original query]71## Decomposition:72- Concept A: [term variations and synonyms]73- Concept B: [term variations and synonyms]74- Filter: [time range, people, teams]7576## Execution Order:771. [High-priority source] — [specific query] — Expected: [what we hope to find]782. [Medium-priority source] — [specific query] — Expected: [what we hope to find]793. [Lower-priority source] — [specific query] — Expected: [what we hope to find]8081## Refinement Triggers:82- If Step 1 finds [X], narrow Step 2 to [Y]83- If Step 1 finds nothing, broaden Step 2 to [Z]84- If conflicting results, add Step 4: [verification query]85```8687### Step 5: Execute and Merge Results8889## Result Ranking Framework9091Score each result on four dimensions:9293| Dimension | Weight | Criteria |94|---------------|--------|-------------------------------------------------------|95| Relevance | 40% | How directly it answers the query |96| Authority | 25% | Source reliability, author expertise, formality level |97| Recency | 20% | How current the information is |98| Uniqueness | 15% | Does it add information not found in other results |99100Composite score: `(Relevance * 0.4) + (Authority * 0.25) + (Recency * 0.2) + (Uniqueness * 0.15)`101102## Output Format103104```105# Search Strategy Report106Query: [original question]107Sources searched: [N] | Results found: [N] | Top results: [N]108109## Search Plan Executed110| Step | Source | Query Used | Results |111|------|----------|-------------------------------|---------|112| 1 | [Source] | [query] | [N] |113| 2 | [Source] | [query] | [N] |114115## Top Results (Ranked)116### 1. [Result Title] — [Source] — Score: [X/10]117- **Relevance**: [why this matches]118- **Key excerpt**: "[relevant quote]"119- **Date**: [date] | **Author**: [author]120121### 2. [Result Title] — [Source] — Score: [X/10]122- **Relevance**: [why this matches]123- **Key excerpt**: "[relevant quote]"124- **Date**: [date] | **Author**: [author]125126## Answer Summary127[Synthesized answer based on top results]128129## Search Refinement Suggestions130- To find more: try [broader query suggestion]131- To narrow down: add [filter suggestion]132- Unexplored sources: [sources not yet queried and why they might help]133```134135## Query Optimization Techniques136137| Technique | When to Use | Example |138|----------------------|------------------------------------|--------------------------------------|139| Synonym expansion | Initial search yields few results | "auth" → "authentication", "login" |140| Phrase matching | Too many irrelevant results | "session storage" (exact phrase) |141| Author filtering | Known domain experts exist | from:jane.doe OR from:john.smith |142| Date narrowing | Topic changed over time | after:2025-01-01 |143| Negative filtering | Known false positives | NOT "session recording" |144| Channel scoping | Known relevant channels | in:#backend-eng |145| Label/tag filtering | Structured metadata available | label:architecture, tag:approved |146147## Iterative Refinement148149After initial results, determine if refinement is needed:150151- **Too many results (>50)**: Add filters, use phrase matching, narrow date range152- **Too few results (<3)**: Expand synonyms, broaden date range, add sources153- **Wrong results**: Analyze why results are off-topic, add negative filters154- **Partial answer**: Identify the gap and formulate a targeted follow-up query155156## Edge Cases157158- **Ambiguous queries**: Ask the user to clarify before executing; present 2-3 interpretations159- **No results anywhere**: Suggest the information may not exist in connected sources; recommend who to ask160- **Cross-language content**: Note if sources contain content in multiple languages; expand queries accordingly161- **Acronyms and jargon**: Expand acronyms in queries and search for both forms162- **Stale indexes**: If a source's index is known to be delayed, warn about potential missing recent items163164## Quality Checklist165166- [ ] Query decomposed into at least 2 sub-queries167- [ ] At least 3 sources considered168- [ ] Results ranked by composite score169- [ ] Conflicting information flagged170- [ ] Knowledge gaps identified171- [ ] Refinement suggestions provided