Giter Site home page Giter Site logo

map-gpt-embeddings's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

map-gpt-embeddings's Issues

Keep track of records split index

Today the mapper will split the record text into sub records https://github.com/MeltanoLabs/map-gpt-embeddings/blob/2155fec353868ef7b6334a8c88a3895130440272/map_gpt_embeddings/mappers.py#L129C13-L129C25 if its too big to be embedded on its own. This means a record that enters the mapper with ID = 1 could exit the mapper as 2 records both with ID = 1. I suspect this has downstream implications if the target is updating based on ID, the second record would win and the first would be clobbered.

Potential Solution

We could keep the split record index and append it to the key_properties so that the output is a composite PK. For example:

  • input of record ID = 1
  • mapper splits it into 2 smaller chunks
  • record ID = 1 with embedding_index = 1, along with record ID = 1 with embedding_index = 2
  • when the target receives these 2 distinct records it will know to concatenate the key properties into 1:1 and 1:2 so both records persist

Confirm naming of the mapper

Initially was map-openai-doc-splitter and map-openai-embeddings. The second of these two can perform both functions, so it probably makes sense to just combine them and have a config option to enable/disable the embeddings operations.

Technically, the langchain module is used for doc splitting, not openai.

While the embeddings do go through OpenAI library directly, the langchain libraries also have methods to wrap this process.

Options considered:

  • map-langchain
  • map-langchain-transforms
  • map-langchain-embeddings
  • map-chatgpt-transforms
  • map-chatgpt-prep
  • map-chatgpt-embeddings
  • map-llm-transforms
  • map-llm-embeddings
  • map-llm-document-prep

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.