Repository navigation
Add the LangChain Advanced RAG, MCP, and Mastra partner cookbooks - #232
Merged
Merged
Conversation
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
mohammaddaoudfarooqi
force-pushed
the
add-langchain-mastra-partner-cookbooks
branch
from
October 13, 2026 21:56
685b590 to
23b7de1
Compare
…-cookbooks Copy of partners/ at 56e1827, verbatim except for scrub.test.ts, whose fake credential fixtures are now assembled at runtime so secret scanners on this repository do not flag them. Adapting the sets to this repository follows in the next commit.
- Give each set its own .env.example (partners/langchain/, partners/mastra/) in place of the old repository-root file. Both config loaders already walk up from the notebook's folder, so they find it unchanged. - Point the Colab badges and the utils.py download at this repository. - Scope the Mastra output scan to these eight notebooks, and resolve the .env for it and the smoke test the same way the notebooks do. - Stop the output scan from treating documented tunables (ANTHROPIC_MODEL and the like) as secrets; .env.example ships them filled in. - List the new sets in partners/README.md. - Apply this repository's pre-commit formatting (ruff, widget state).
mohammaddaoudfarooqi
force-pushed
the
add-langchain-mastra-partner-cookbooks
branch
from
October 13, 2026 21:58
23b7de1 to
3953ac1
Compare
The committed Mastra outputs came from the @mastra/mongodb 1.15 run and the MCP outputs from an older mongodb-mcp-server. All eight notebooks are now re-executed from this repository with the pinned dependencies, on a cluster holding only sample_mflix's own collections, so the LangChain listings no longer show the Mastra set's store collections. - Number the Mastra cells (scripts/number-cells.ts); tslab records none. - Mastra 03: the rank-fusion table's prose now matches its numbers, using the Ewoks row as the worked example of a pool mismatch. - Mastra 04: ask "Which of those three is the oldest?" rather than the ambiguous "older", and stop quoting the limit the model picks. - LangChain 02: it creates only the full-text index; say so. - LangChain 03: describe the auto-embedding scores as they are.
ninalopatina
approved these changes
Oct 13, 2026
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.
What this does
Moves the LangChain and Mastra cookbooks from mongodb-partners/partner-cookbooks into
partners/:partners/langchain/advanced-rag/— 3 notebooks: vector, full-text, hybrid$rankFusion, reranking,$graphLookup, auto-embeddingpartners/langchain/claude-code-mcp/— 1 notebook: a LangGraph agent over the MongoDB MCP Serverpartners/mastra/— 4 TypeScript notebooks (tslab kernel): retrieval, bring-your-own collections, hybrid search, agents with persistent memoryNothing that already exists in this repository is modified except
partners/README.md, which gains three table rows and a short Mastra entry.partners/langchain/existing content is untouched; the new sets sit beside it.Commits
partners/at partner-cookbooks56e1827, so the history shows what was imported. It is verbatim exceptpartners/mastra/src/scrub.test.ts, whose fake credential fixtures are now assembled at runtime so GitGuardian does not flag them as live secrets..env.example(partners/langchain/,partners/mastra/) instead of a repository-root one. Both config loaders already walk up from the notebook's folder, so no loader logic changed.utils.pydownload URL point atmongodb-developer/GenAI-Showcase.npm test) covers only these eight notebooks rather than every notebook in the repository, and it no longer treats documented tunables such asANTHROPIC_MODELas secrets..gitignores fornode_modules/and__pycache__/.@mastra/mongodb1.15. The Mastra cells are now numbered, and a few prose passages that had drifted from their outputs are corrected.Testing
All of the following ran from the new location on a branch checkout, against a live Atlas M0 cluster:
pre-commit run --all-files: every hook passes, no files modifiedpytest test_utils.py: 29 passednpm ci, including the tokenizer prefetch:npm test86 passed and the credential scan is clean;npm run typecheckis clean;npm run smokegives 8 passed, 1 skipped by design (M0 index budget)nbconvert --execute, with 0 errors. These are the committed outputs, each read against its notebook's prose.movies_vector_indexandmovies_fulltext_index, no scratch collectionsNotes
utils.pyfetch resolve once this is onmain.sprintf-js(GHSA-hp3w-g68c-fv3c) inpartners/mastra/package-lock.json. No patched version exists.partners/mastra/README.mdexplains why neither path to it is reachable.