Skip to content

Conversation

@meirk-brd
Copy link
Collaborator

@meirk-brd meirk-brd commented Nov 4, 2025

Summary

Optimizes token consumption for structured and markdown data:

  1. Null filtering: filtered out null values for web_data_* tools, reducing tokens by 5-10%

  2. Markdown Minification: Implements remark + strip-markdown plugin for scrape_as_markdown tool, achieving 60% token reduction by removing base64 images, HTML tags, and formatting while preserving meaningful content

  3. Google Search Response Sanitization: Cleanses search results by normalizing whitespace, removing Unicode formatting characters, deduplicating related keywords, and extracting only essential fields (link, title, description) from organic results (Thanks to Nikita for this valuable feedback | example response)

Changes

  • Added remark/strip-markdown processing pipeline for markdown responses
  • Implemented clean_google_search_payload() to sanitize and normalize search engine results

(Still being tested and evaluated for efficiency)

@meirk-brd meirk-brd changed the title feat: Add TOON (Token-Oriented Object Notation) support for efficient data serialization feat: Optimize responses for token efficiency Dec 7, 2025
@meirk-brd meirk-brd marked this pull request as ready for review December 11, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants