Closed evangriffiths closed 3 days ago
So far, it doesn't look like there is much to get from cache, but agents were bugging out because of insufficient database instance, so I'll check again at the end of the week:
Based on this SQL
select sum(count) from (
SELECT
COUNT(DISTINCT agent_id) AS unique_agent_count,
query,
count(*) as count
FROM tavily_response
group by query
having count(*) > 1
) as X;
Out of 1317 records, 151 could come from the cache, that's 11%.
That's not bad, but I expected more.
We have 18k credits left this month, and it's only a week to the end; I'd revert the agents to be executed more often, and let's see what it does.
Added to PMAT in https://github.com/gnosis/prediction-market-agent-tooling/pull/380/files and because we already provide TavilyStorage everywhere, it will come from cache if possible.
Follow-on from https://github.com/gnosis/prediction-market-agent-tooling/pull/337
Motivation is to save tavily credits.
instead of
tavily_search
should take some extra arg (or maybe fold intit args ofTavilyStorage
) to configure when how to search saved results for a cache hit, otherwise do a new search.