[Content] Add research assistant cookbook with Web + X search - #32
Open
dominicva wants to merge 12 commits into
Open
[Content] Add research assistant cookbook with Web + X search#32dominicva wants to merge 12 commits into
dominicva wants to merge 12 commits into
Conversation
Introduce a new cookbook notebook demonstrating Grok's built-in web search with domain filtering via the native xai-sdk. Covers setup, curated domain lists, and inline citations from vetted news outlets.
Add an interlude comparing filtered and unfiltered web search results, then introduce X search for public discourse on the same topic. Shows how domain filtering affects source quality and contrasts press reporting with social sentiment.
Add the three-pass reconciliation that cross-references web and X search findings, clustering claims into five categories using Pydantic structured output via response_format.
Wrap the three-pass flow into a reusable research() function and demonstrate it on additional topics: semiconductor supply chains and AI coding tools. Add conclusion with extension ideas.
Add API key validation, fix registry trailing newline, and rewrite conclusion to focus on design decisions.
- Generate sci-fi cover image with Grok and add to registry - Validate allowed_domains max-5 limit in research() helper - Soften hard-coded pricing to avoid stale dollar estimates - Re-execute all cells for up-to-date search outputs
- Add url field to Claim model so every claim in the divergence briefing links back to its original source - Pass citation URLs into the reconciliation prompt via _format_findings() helper - Restore python-dotenv as an explicit dependency - Soften result-dependent commentary and reword caveats - Clear noisy pip install output - Re-execute notebook with fresh outputs
- Use typing.Literal for category fields on Claim and ClaimCluster so invalid labels are rejected by the schema - Fix falsey check on web_domains so passing [] allows unfiltered search - Re-execute notebook with fresh outputs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a cookbook that cross-references news sources with X discourse to produce a structured divergence briefing.
Why this change matters:
Type(s) of Change
Checklist
CONTRIBUTING.mdregistry.yaml