4 ms·
This is pretty useless to be honest. It's good for telling whether a number is even, but in our industry we need more powerful functionality. We also need to
by iamthemonster 1y ago
This is pretty useless to be honest. It's good for telling whether a number is even, but in our industry we need more powerful functionality. We also need to know whether a number is odd.
- charles_f 1y agoRTFM, it's not only implementing isOdd but also a large set of rarely used advance operations such as isEqual, or isGreaterThan Trully AI is astonishing
- avandekleut 1y agoSomeone should implement this using tool calls.
- YokoZar 1y agoGreat news! The package includes an isOdd function as well!
- nbittich 1y agoisn't it breaking the one package one responsibility principle?uncle bob wouldn't be happy, it doesn't seem clean
- whynotmaybe 1y agoWhy a specific function ? With a few lines of code, you can just create a list with all the numbers that are even and when you need to check if a number is odd, you simply have to check if it's in the list.
- sureIy 1y agoDo we have enough spaces in the ALL_NUMBERS array or do we want to group them by thousands? ALL_NUMBERS_00001 ALL_NUMBERS_00002
- kaibee 1y agoYeah, some of the bigger numbers were a problem, so we switched to using a horizontally scaling db cluster so that we could cover all of the (useful) numbers. When we encounter a new number, it gets routed to the appropriate db where the results of the function are cached after being calculated. We're thinking of spinning it off as an API service actually if there's any interest.
- iamthemonster 1y agowe fired all our junior devs so we can't write code any more
- turnsout 1y agoYes, this is what we do as a RAG workflow. We created a list of all 32bit unsigned integers and whether they were even or odd, and we pass that into the context. The future is amazing!
- Charon77 1y agoI.. can't tell if you're joking or not. Pretty sure someone out there is unironically doing something as stupid as this in production
- ryanpandya 1y agoThe good news is they're definitely joking. The bad news is that indeed, there's definitely someone out there doing this unironically.
- whynotmaybe 1y agoYes, there is. A former co-worker had to print 5 lines of text. Sometimes, some of the lines were empty but he didn't want to print an empty line. So he did the usual, use 'if', a lot of 'if'. He handled all the possible cases of empty VS not empty lines.
- MikeTheGreat 1y agoI'm new to RAG and have a question: how do you get all the numbers into the context window? Does the RAG part look up just the needed number? I think that Gemini has a million token window (yes?) - do you have access to a model with a larger window? Regardless, I find your ideas intriguing and wish to subscribe to your Substack.
- turnsout 1y agoWe have an agentic system that looks up the context size, and then summarizes the even/odd table if necessary. We lose a little bit of accuracy, but now we can handle any model. Be sure to like & subscribe!
- crubier 1y agoYou can achieve this super simply this by prompting the OpenAI API to call this tool and reverse the output.
- Cerium 1y agoSimply add one to the number and then test it again.
- briansm 1y ago"This is pretty useless to be honest." I remember saying that about Bitcoin 15 years ago.