Nils Reichardt
Nils Reichardt9mo ago

Is it possible to search for number

Is it possible to search for number values (not strings) in my metadata?
No description
5 Replies
Nils Reichardt
Nils Reichardt9mo ago
Ah, technically, it's possible but in practice not really useful because there are no >, <, >=, <= operators Current workaround: If I'm searching for traces with 'tokensPerCard' > 300 I can do multiple search queries with "'tokensPerCard' starts with '30'", "'tokensPerCard' starts with '40'", "'tokensPerCard' starts with '50'", etc.
Marc
Marc9mo ago
Hi Nils, unfortunately currently only the string operators are supported Supporting more datatypes would require parsing metadata fields and inferring types increasing the complexity here a lot One solution could be to pad the field with leading zeros but I understand if this is not convenient Supporting other data types here would definetly be a nice feature
Nils Reichardt
Nils Reichardt9mo ago
Thanks for the response 🙏 Is sorting (desc or asc) a metadata key complex? My goal is to identify expensive traces (measured by "Tokens per flashcard" - using total cost of the trace is not really helpful because a trace can generate a deck between 10 and 40 cards)
Marc
Marc9mo ago
Is each flashcard 1 generation?
Nils Reichardt
Nils Reichardt9mo ago
A (Langfuse) generation can create up to 40 flashards. It depends on a few factors.