r/AI_Agents • u/Rel_R • 4h ago
Discussion Need Help With My First Python AI Agentic Project
Hey Guys I'm a beginner at this and recently been working on a Project. The name of the project is "Geo-Wizard". As I like geography.
What it does is :
-> It will be given a Json file containing a list of any number of countries & their continents.
-> It will return a Json file containing a list of all of those countries with their parameters.
Exact Parameters are -
- Language spoken
- Widely followed religion
- Capital
- One thing country known for
- One thing country invented
- HDI
- Currency
- Type of Government in the country.
Current Architecture :
I am using Tavily & Grok
Tavily: for searching and getting the data
Grok: for parsing the data and making a clean Json file
I am doing this because i do not have any subscription & i wanna cut on number of tokens that's why i'm using these 2.
Tavily provides 1000/Month
Problem : I cannot get the required data for all these parameters with tavily. I've tried a couple of things & I really need help.
There's this website called countriesworld which provides data for like 5 of these categories.
Here's a List of things I tried :
- Tavily Search Task: I tried meddling with include domains, domain prefer mode and other things but the search task isn't doing the job it only populate the result with most popular keywords and don't work.
- Tavily Research Task: I tried token cutting but doesn't work for Research task.
- Tavily Extract Task: I thought of extracting the countriesworld page that would give me 5 of those categories and then i will just use search task to get the rest & boom shit will be done. But i was wrong Tavily search task picks the popular out of those 3 and populate the results with them.
I currently have 2 json files one will be list of countries.
other is my config file where i have mentioned some rules.
Is there any way i can carry forward with my project i do not wanna take a subscription or want unlimited tokens through Omni route.
Any help is appreciated
1
u/MobileXapps 4h ago
Search is the wrong tool for most of these fields. Language, capital, currency and region come from the REST Countries API in one call, free and with no key. HDI is a yearly table in UNDP's Human Development Report that you can download as CSV. Government type and main religion are on Wikidata, and one SPARQL query gets them for every country.
That leaves only 'known for' and 'invented', which are opinions anyway, so that's the one place to use the model. Give it the country name and ask for one short answer each. You'll burn far fewer tokens and Tavily credits, and the facts won't change between runs.
1
u/AutoModerator 4h ago
Thank you for your submission, for any questions regarding AI, please check out our wiki at https://www.reddit.com/r/ai_agents/wiki (this is currently in test and we are actively adding to the wiki)
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/SurtidaZukhra 57m ago
do you even need web search for this? almost all of those parameters are static historical or geographic facts that any base model already knows from its training data, except maybe the latest HDI numbers