Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(EAI-375): Ingest snooty docs facets and meta #558

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

mongodben
Copy link
Collaborator

@mongodben mongodben commented Nov 14, 2024

Jira: https://jira.mongodb.org/browse/EAI-375

Changes

  • Ingest Snooty docs meta and facets fields as Page.metadata
  • Add chunking concurrency

Notes

Experiment Results

Experiment compares using the ingestion pipeline with the new snooty metadata to the previous baseline. The results can be found here: mongodb-chatbot-retrieval/experiments/mongodb-chatbot-retrieval-snooty-metadata

The results actually show a very slight decrease in search quality as a result of these changes:

  • BinaryNDCG@5 goes from 33.20% -> 33.05% (-0.15%)
  • F1@5 goes from 23.33% -> 22.88% (-0.45%)

Next Steps

Based on the results, I think we should take one of the following paths:

  1. YOLO merge changes. The difference is pretty marginal in the evals. Probably won't have a meaningful impact on system. Could potentially have positive impact later on with things like changing embedding model, etc.
  2. Make additional 'Retrieval system upgrade' changes to chatbot (new embedding model, hybrid search, etc.). See if the additional metadata has positive impact then.
  3. Experiment with only embedding certain fields of the metadata, changing the name etc.
  4. Don't include the metadata in chunks, just ingest into pages collection.
  • Note that this will require changing our chunking system to accommodate this.

My inclination is to proceed with path 2. Leave this to the side, and if we can't the metadata inclusion to improve system performance, then do some light experimentation on path 3, and only do 4 if we can't get it to work.

But then again, maybe I'm overcomplicating and we should just YOLO path 1, shouldn't having meaningful negative impact...

@mongodben mongodben marked this pull request as draft November 14, 2024 14:44
@mongodben mongodben marked this pull request as ready for review November 15, 2024 14:49
@mongodben mongodben added the DO NOT MERGE Not yet ready for merge label Nov 15, 2024
const facetAndMetaNodes = findAll(
node,
({ name }) => name === "facet" || name === "meta"
) as (SnootyFacetNode | SnootyMetaNode)[];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for now. Longer term if we plan to maintain this Snooty AST glue code then it might be nice to move to Zod parsing for these instead of type casts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE Not yet ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants