Shapeshift: Semantically map JSON objects using key-level vector embeddings
11–20 of 37 posts
Re: Shapeshift: Semantically map JSON objects using key-level vector embeddings
#12This is the code that does the work: https://github.com/rectanglehq/Shapeshift/blob/d954dab2a866c... There are a few ways this could be made a less expensive to run: 1. Cache those embeddings somewhere. You're only embedding simple strings like "name" and "address" - no need to do that work more than once in an entire lifetime of running the tool. 2. As suggested here https://news.ycombinator.com/item?id=40973028 cha…
Re: Shapeshift: Semantically map JSON objects using key-level vector embeddings
#13This is the code that does the work: https://github.com/rectanglehq/Shapeshift/blob/d954dab2a866c... There are a few ways this could be made a less expensive to run: 1. Cache those embeddings somewhere. You're only embedding simple strings like "name" and "address" - no need to do that work more than once in an entire lifetime of running the tool. 2. As suggested here https://news.ycombinator.com/item?id=40973028 cha…
Watch out with the array mode though, according to OpenAI docs it technically can return the results in any order and you must sort them by index to be sure you have the right associations. I’ve never seen them out of order in practice, but it’d be entirely in-character for them to suddenly change that sporadically and without warning, and now your entire vectordb may or may not be nondeterministically ruined.
Re: Shapeshift: Semantically map JSON objects using key-level vector embeddings
#14Re: Shapeshift: Semantically map JSON objects using key-level vector embeddings
#15Re: Shapeshift: Semantically map JSON objects using key-level vector embeddings
#16Re: Shapeshift: Semantically map JSON objects using key-level vector embeddings
#17Since LLMs are bad at the null hypothesis (in this case, when a key does not exist in the source JSON), how does this prevent hallucinating transformations for missing keys?
Re: Shapeshift: Semantically map JSON objects using key-level vector embeddings
#18Re: Shapeshift: Semantically map JSON objects using key-level vector embeddings
#19Since LLMs are bad at the null hypothesis (in this case, when a key does not exist in the source JSON), how does this prevent hallucinating transformations for missing keys?
Re: Shapeshift: Semantically map JSON objects using key-level vector embeddings
#20I've turned the target object into a JSON schema, but you could probably generate that JSON schema pretty reliably using a codegen LLM.