Overview

The Web Search tool returns relevant text snippets from the web. Instead of providing traditional search links, it returns highly relevant and directly usable text snippets.

But why choose THIS?

Traditional web search implementation requires 4 complex steps:

  1. Implement link scraping or integrate standard search APIs
  2. Extract content from scraped links
  3. Build embedding infrastructure
  4. Calculate query-text similarity matches

Using our tool simplifies this entire process into a single step: Input your query, receive relevant text snippets directly. Focus your resources on building your core application instead of search infra.

Code Example

You will need to install the Mechanix Python SDK.

from mechanix import Mechanix

mec = Mechanix()

# Perform a web search
response = mec.tools.search_web(query="What is OpenAI's 'o3' model?")

print(response.data.results[0].content)
# "OpenAI saved its biggest announcement for the last day of its 12-day..."

For added convenience, we could pass in llm_answer=True for a answer:

response = mec.tools.search_web(query="...", llm_answer=True)
# print(response.data.llm.answer)
# print(response.data.llm.answerable_probability)

The LLM component returns:

  • answer: Generated response text that answers the query using the resulting code snippets.
  • answerable_probability: Confidence score indicating source relevance (not factual correctness).

Current Limitations

  • Limited efficacy for non-English language processing
  • Automatic rejection of harmful or toxic inputs
  • Cannot return content such as images, videos, or audio.

Explore the following resources to continue learning: