[Langchain] Infer dimensions from embedding if not provided

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: AI/ML, LangChain
    • None
    • Python Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      We currently require a user to know and provide the dimension of an embedding model even when we create the vector index for them.

      This can easily be inferred from the Embeddings model: n = len(embedding.embed_query("foo"))

      See https://github.com/langchain-ai/langchain-mongodb/blob/main/libs/langchain-mongodb/langchain_mongodb/vectorstores.py#L210

      Definition of done

      Make the change shown above; pass tests; document behavior; bump version and release.

      Pitfalls

      We need to consider versioning and compatibility. This would be changing the default so a breaking change.

            Assignee:
            Unassigned
            Reporter:
            Casey Clements
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: