← All work
Product · 2025

xAI Grok Live X-Search Evaluation

Overview

A focused evaluation of xAI’s Grok model and its live X (Twitter) search tooling. The script drives Grok with both keyword and semantic X-search tools against a boolean query, then writes the harvested results to CSV.

Why It Exists

To assess how well a frontier model with first-party access to live social data can retrieve and structure real-time posts, useful for media-monitoring and trend-analysis use cases where freshness matters more than a static training corpus.

What We Built

A Python script (search_tweets.py) using xai-sdk to create a grok-4-1-fast chat configured with the x_search tool over a fixed date window. It prompts the model to run both keyword and semantic searches to maximize coverage, streams verbose output, and exports the gathered posts to tweets.csv. Configuration is via a .env API key and an isolated virtualenv.

Technologies & Approach

xAI’s xai-sdk and the x_search tool for live retrieval, Grok as the reasoning/aggregation layer, and CSV for downstream analysis. Dual keyword-plus-semantic search was used deliberately to widen recall.

Outcome / Impact

A working build that validated xAI’s live X-search tooling end to end, from prompt to structured CSV, and gauged its fit for real-time social retrieval tasks.

Capabilities Demonstrated

  • Evaluating frontier LLM tool-use (xAI Grok x_search)
  • Live social-media retrieval and aggregation via an LLM
  • Combining keyword and semantic search for recall
  • Exporting model results into structured datasets
More work See all →