Update Exa integration examples to use search()#2963
Open
10ishq wants to merge 2 commits into
Open
Conversation
|
@10ishq is attempting to deploy a commit to the langfuse Team on Vercel. A member of the Team first needs to authorize it. |
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Co-Authored-By: Tanishq Jaiswal <tanishq.jaiswal97@gmail.com>
Co-Authored-By: Tanishq Jaiswal <tanishq.jaiswal97@gmail.com>
Author
|
Hey @marcklingen — updates the Exa integration examples to current API conventions. CLA is signed. Would appreciate a review! |
Member
|
thank you! @jannikmaierhoefer can you review this? |
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.
Updates the Exa integration examples:
search_and_contents()tosearch()in both examplestextandhighlightscontent optionsGreptile Summary
This PR updates both the MDX integration page and the companion Jupyter notebook to use Exa's
search()method instead ofsearch_and_contents(), removing page-text retrieval from the examples.exa.search()returns title and URL per result, and the display loop now prints those two fields with a blank separator line.execution_count/outputsfields), which is cosmetic but makes diffs harder to read in future PRs.Confidence Score: 3/5
Example 2 demonstrates a broken RAG pattern — the LLM receives only link titles, not page content — so merging as-is would publish misleading documentation to users.
The summarization example now feeds the OpenAI model a list of page titles and URLs while still asking it to summarize search results. Any user who follows this example will get a low-quality or fabricated summary because there is no actual text content in the context. This is the core intent of the integration guide and it is demonstrably undermined by the change.
Both content/integrations/other/exa.mdx and cookbook/integration_exa.ipynb share the same broken summarization context in Example 2 and need to be addressed together.
Sequence Diagram
sequenceDiagram participant User participant search_and_summarize participant search_with_exa participant Exa participant OpenAI User->>search_and_summarize: query search_and_summarize->>search_with_exa: "query, num_results=5" search_with_exa->>Exa: exa.search(query, num_results) Note over Exa: Returns title + URL only<br/>(no page text) Exa-->>search_with_exa: SearchResponse (title, url, id) search_with_exa-->>search_and_summarize: results search_and_summarize->>search_and_summarize: "build context = title + URL only" search_and_summarize->>OpenAI: Summarize... + context (titles/URLs) Note over OpenAI: No actual page content to summarize OpenAI-->>search_and_summarize: low-value summary search_and_summarize-->>User: print summaryPrompt To Fix All With AI
Reviews (1): Last reviewed commit: "use search instead of search_and_content..." | Re-trigger Greptile