analyze_document_relevance
Performs intelligent pre-analysis of a parliamentary document to determine its relevance WITHOUT loading the full content into your context window. This is a lightweight reconnaissance tool that extracts key information about a document's content before you commit to reading the full text. Use this to efficiently assess whether a document is worth reading in detail, especially when you're uncertain about relevance or need to triage multiple documents.
WHAT THIS TOOL RETURNS:
- Keywords: Top 10-15 most important terms extracted via TF-IDF analysis, revealing the document's main subjects (e.g., 'klimaat', 'belasting', 'migratie', 'gezondheidszorg')
- Named Entities: Structured lists of people mentioned (MPs, ministers, officials), political parties (VVD, PVV, CDA, D66, GroenLinks, etc.), and organizations
- Statistics: Document length (character count, word count), estimated reading time, and structural information about the document format
- Preview: The first ~500 characters of the document for immediate context
- Topics: Main themes and subject areas identified through content analysis
- Relevance Score (optional): If you provide the searchTerms parameter, returns a 0-100 score indicating how well the document matches those specific terms, helping you rank multiple documents by relevance
WHEN TO USE THIS TOOL:
- When you need to understand what a document is about before reading it in full
- When you have multiple candidate documents and need to determine which ones are most relevant
- When you want to verify a document contains specific topics or entities before loading its full content
- When context window efficiency is important and you want to avoid loading large documents that may not be relevant
- When a user asks about document content but you're uncertain if it matches their query
- When you need to filter or triage search results before committing to detailed reading
WHEN NOT TO USE THIS TOOL:
- When the user explicitly requests the full content or specific quotes from a document
- When you already have high confidence the document is relevant and need to read it anyway
- When you specifically need to locate where a person appears in a document (find_person_in_document is optimized for this)
- When you only need structural metadata like title, date, and links
RELATIONSHIP TO OTHER DOCUMENT TOOLS:
- get_document_content: This analysis tool is lighter weight (~1-2KB) compared to reading full documents (10-50KB). Both tools access document content but serve different purposes: analysis for triage and overview, get_document_content for detailed reading.
- find_person_in_document: The analysis tool identifies IF a person is mentioned; find_person_in_document locates WHERE they appear with character offsets. Analysis provides presence information, find_person provides location information.
- get_document_details: Details provides structural metadata (title, type, date, links); this tool provides content intelligence (keywords, entities, topics). They offer complementary information about documents.
- search_tk/search_tk_filtered: Search identifies candidate documents; this tool provides detailed content analysis of those candidates.
CONTEXT WINDOW EFFICIENCY: This tool returns approximately 1-2KB of analysis data versus 10-50KB for reading full documents. Using this tool before get_document_content can reduce context usage by 80-90% when documents turn out to be irrelevant. It's particularly valuable when evaluating multiple documents or when a user's query is exploratory rather than specific.
The searchTerms parameter is powerful for ranking documents by relevance: when provided, it calculates a 0-100 relevance score based on how well the document matches your search terms, allowing you to objectively compare multiple documents before deciding which to read in full.