mpep-search
About
This skill provides hybrid RAG search across USPTO patent documentation (MPEP, statutes, regulations) with post-January 2024 updates. It combines FAISS vector search, BM25 keyword matching, HyDE, and cross-encoder reranking for precise results. Use it when you need to query or retrieve specific passages from official U.S. patent examination materials.
Documentation
MPEP Search Skill
Search MPEP corpus through hybrid RAG (FAISS vector + BM25 keyword + HyDE + cross-encoder reranking).
Sources:
- MPEP: Manual of Patent Examining Procedure
- 35 USC: United States Code Title 35
- 37 CFR: Code of Federal Regulations Title 37
- Subsequent Publications: Federal Register updates (post-Jan 2024)
Core Operations
1. search_mpep
Inputs:
query(string, required): Search query (minimum 3 characters)top_k(int, optional): Number of results (default: 5, max: 20)retrieve_k(int | None, optional): Candidates before reranking (default: top_k * 4, max: 100)source_filter(string | None, optional): Filter by source ("MPEP","35_USC","37_CFR","SUBSEQUENT", orNone)is_statute(bool | None, optional): Filter for statute contentis_regulation(bool | None, optional): Filter for regulation contentis_update(bool | None, optional): Filter for recent updates
Outputs:
{
"rank": int,
"source": str,
"section": str,
"file": str,
"page": int,
"has_statute": bool,
"has_mpep_ref": bool,
"has_rule_ref": bool,
"is_statute": bool,
"is_regulation": bool,
"is_update": bool,
"relevance_score": float,
"text": str,
# Optional for SUBSEQUENT:
"doc_type": str,
"fr_citation": str,
"effective_date": str
}
Examples:
# Basic search
search_mpep("enablement requirement 35 USC 112", top_k=5)
# Search only statutes
search_mpep("written description", top_k=10, is_statute=True)
# Search recent updates
search_mpep("AI inventorship", is_update=True)
# Filter by source
search_mpep("fee schedule", source_filter="37_CFR")
2. get_mpep_section
Retrieve all content from specific MPEP section.
Inputs:
section_number(string, required): MPEP section number (e.g.,"2100","608.01")max_chunks(int, optional): Maximum chunks to return (default: 50)
Outputs:
{
"section": str,
"total_chunks": int,
"chunks": [
{
"text": str,
"metadata": {
"source": str,
"file": str,
"page": int,
"section": str,
"has_statute": bool,
"has_mpep_ref": bool,
"has_rule_ref": bool,
"is_statute": bool,
"is_regulation": bool,
"is_update": bool
}
}
]
}
Error Response:
{"error": "No content found for MPEP section {section_number}"}
Examples:
# Get MPEP 2100 (Patentability)
get_mpep_section("2100", max_chunks=50)
# Get subsection
get_mpep_section("608.01")
Input Validation
Query validation:
- Minimum 3 characters
- Case-insensitive
- No empty/whitespace-only queries
Section number validation:
- Numeric with optional decimal (e.g., "100", "2100", "608.01")
Limits:
top_kcapped at 20retrieve_kcapped at 100
Implementation Notes
Index Location:
- FAISS index:
mcp_server/index/mpep_index.faiss - Metadata:
mcp_server/index/mpep_metadata.json - BM25 index:
mcp_server/index/mpep_bm25.json
Search Architecture:
- HyDE Query Expansion (hypothetical documents)
- Hybrid Retrieval (FAISS vector + BM25 keyword via RRF)
- Cross-Encoder Reranking (final relevance scores)
- Metadata Filtering (source/type filters)
Dependencies:
- sentence-transformers (BGE-base-en-v1.5)
- FAISS (vector search)
- rank-bm25 (keyword search)
- Cross-encoder (reranking)
- HyDE (optional, graceful degradation)
Error Handling:
- Clear error messages for missing index/invalid queries
- Graceful degradation if HyDE fails
- Input validation before processing
Quick Install
/plugin add https://github.com/RobThePCGuy/Claude-Patent-Creator/tree/main/mpep-searchCopy and paste this command in Claude Code to install this skill
GitHub 仓库
Related Skills
subagent-driven-development
DevelopmentThis skill executes implementation plans by dispatching a fresh subagent for each independent task, with code review between tasks. It enables fast iteration while maintaining quality gates through this review process. Use it when working on mostly independent tasks within the same session to ensure continuous progress with built-in quality checks.
algorithmic-art
MetaThis Claude Skill creates original algorithmic art using p5.js with seeded randomness and interactive parameters. It generates .md files for algorithmic philosophies, plus .html and .js files for interactive generative art implementations. Use it when developers need to create flow fields, particle systems, or other computational art while avoiding copyright issues.
executing-plans
DesignUse the executing-plans skill when you have a complete implementation plan to execute in controlled batches with review checkpoints. It loads and critically reviews the plan, then executes tasks in small batches (default 3 tasks) while reporting progress between each batch for architect review. This ensures systematic implementation with built-in quality control checkpoints.
cost-optimization
OtherThis Claude Skill helps developers optimize cloud costs through resource rightsizing, tagging strategies, and spending analysis. It provides a framework for reducing cloud expenses and implementing cost governance across AWS, Azure, and GCP. Use it when you need to analyze infrastructure costs, right-size resources, or meet budget constraints.
