AutoGen Token Tactics: FIRING AI Agents, USELESS Vector Embeddings, GPT-4 Memory Tricks
IndyDevDan
@indydevdanAbout
On this channel we think, plan, and build. Right now on the channel, we're on the path to evolve into Agentic engineers. Engineers that build software that works for them while they sleep. Here are principles of my engineering philosophy and ideologies this channel holds as facts. - Avoid hype, focus on real valuable tools, technology and products. - Build real products. There are enough news, hype, trend channels. Let's make something real. - Listen to feedback but always think for yourself. - Use the best technology for the job period full stop. - Keep learning, forever. - Do what you share. I don't share anything on this channel I'm not betting on with my time, energy and money. - Cancel out the noise and focus on the signal of value creation. - Great things happen in the flow. Look for it everyday. I'm not the perfect programmer, designer, or creator but to succeed you don't have to be perfect, you just have to try, over and over in success or failure.
Latest Posts
Video Description
Are you lighting MONEY on FIRE while building prompts and multi-agent systems powered by GPT-4 and AutoGen? 🔥💰🔥 Nice, same - LET'S FIX THAT. GPT-4 and all LLMs have one major flaw: The Context Window. If you've written prompts and have tried to insert tons of data into a single prompt you've likely experienced a TOKEN EXPLOSION. Our Postgres AI data analytics is running into this very issue. We've been building and testing with only 2 tables when in reality, we need to operate on potentially hundreds of postgres tables and millions of rows. In this video, we directly address that issue with two primary techniques. First, we utilize vector embeddings to run a similarity search across all of our table's SQL creation statements against our natural language query. Next we utilize simple string matching that gets the job done 100x better than vector embeddings at the cost of being a bit more verbose in our prompt. If you can solve the problem with a simple solution, start there. This enables us to load only tables relevant to our query into our initial prompt that our multi-agent system takes, generates SQL for, and then obtains the response. It's not all good news though. In order to allow potentially millions of rows process through our postgres ai agent system, we have to let go of our AutoGen multi-agent data visualization team. After we add token and price estimation into our orchestrator class we learn that our data viz team is just too expensive to keep on the team in our current inflationary market. We have to let them go and tighten up our multi-agent team. It seems ridiculous but one day we may be making judgement calls on which ai agents we want to keep on our team and which ones we need to let go. This is the beginning of agentic software engineering. 👍 THE CODEBASE https://github.com/disler/multi-agent-postgres-data-analytics/tree/v4-autogen-token-tactics-firing-ai-agents ✅ Watch Part Three - Make AutoGen Consistent https://youtu.be/4o8tymMQ5GM 🤖💻 AI Engineering Resources Microsoft's Autogen: https://microsoft.github.io/autogen/ Free Postgres Hosting With Neon: https://neon.tech/ Bert Word Embeddings: https://is-rajapaksha.medium.com/bert-word-embeddings-deep-dive-32f6214f02bf 🤖 ZERO Touch coding with AIDER? YUP https://youtu.be/MPYFPvxfGZs 📘 Chapters 00:00 Push into a new field of agentic engineering 00:50 Our Postgres tool has one MAJOR problem 02:00 Let's Review Our Mult-Agent Tool 03:50 I've been deceptive - here's why 04:50 CLEAN Refactor 07:05 Now We'll Light A Dollar On Fire 08:28 Vector Embeddings Module 12:55 Embeddings don't always work - try this 16:55 Keep track of OpenAI GPT-4 Costs 20:15 Bad News For Our AI Agent Data Viz Team 22:00 Our new trimmed down multi-agent team 26:10 Keep stacking your AGENTIC building blocks 26:50 What's next? API, UI, More Agents, More Conversation Flows 28:35 Let's discuss top comments 🐛 tags #sql #agentic #promptengineering
Upgrade Your Everyday
AI-recommended products based on this video

Kasa Smart Outdoor Smart Plug by TP-Link (KP400) - Smart WiFi Outlet with 2 Sockets, IP64 Waterproof, Works with Alexa and Google Home, 2.4GHz WiFi Required, No Hub Required, Sunset & Sunrise Offset

Open Ear Wireless Earbuds, Sports Bluetooth Headphones with Real Time Translation, 80Hrs Playtime with LED Power Display, Noise Canceling Headset, IP55 Waterproof Earphones for Workout/Running (Black)

Wireless Earbuds, Sports Bluetooth Headphones, 80Hrs Playtime Ear Buds with LED Power Display, Noise Canceling Headset, IPX7 Waterproof Earphones for Workout/Running Z(Black)

Monster Wireless Earbuds Open Ear AC311, Bluetooth 5.4 Open Ear Headphones, Up to 30 Hours Playtimes Bluetooth Ear Earphones with Stereo Sound, Touch Control and IPX5 Waterproof Open Ear Buds

Wireless Earbuds, Sports Bluetooth Headphones, 80Hrs Playtime Ear Buds with LED Power Display, Noise Canceling Headset, IPX7 Waterproof Earphones for Workout/Running Z(Black)

Brita Stainless Steel Premium Filtering Water Bottle, BPA-Free, Reusable, Insulated, Replaces 300 Plastic Water Bottles, Filter Lasts 2 Months or 40 Gallons, Includes 1 Filter, Carbon - 20 oz.

Simple Modern Filtered Water Bottle | Insulated Stainless-Steel Carbon Filter Travel Water Bottles | Reusable for Clean Drinking Water On The Go | 24oz, Sea Glass Sage

FITVII Health & Fitness Tracker (Answer/Make Calls), Smart Watch with 24/7 Heart Rate and Blood Pressure, Sleep Tracking Monitor, 120+ Sport Mode Activity Tracker

AYATAHA AYATAHA Smart Watch for Kids, Smartwatch Fitness Tracker for Boys Girls, Children's Activity Watch 37 Sports Modes SMS Notification, HD Full Touchscreen IP67 Waterproof, Blue

Iaret Iaret Smart Watch for Women, 1.83" HD Fitness Tracker with 4 Bands, Answer/Make Calls, Heart Rate/Sleep/SpO2/Step Tracking, 100+ Sport Modes, Android/iPhone Compatible Gift (Rose Gold)

Smart Watch for Men Women 1.8" Fitness Tracker, Bluetooth Call, DIY Dial, Heart Rate Sleep Blood Oxygen Monitor, 100+ Sports Modes, IP68 Waterproof Smartwatch for Android iPhone, Alexa Built-in

Hand Warmers 2 Pack, 14000mAh Rechargeable Hand Warmers, Electric Hand Warmer Reusable, Portable Power Bank USB Hand Warmers 4 Levels 8 Heating, Gifts for Raynauds Ski Golf Camping

Hand Warmers Rechargeable, 10000mAh Electric Heated Gloves Power Bank Portable Graphene Handwarmers Pouch with 3 Levels & Double-Sided Heating for Hunting Camping Golf Xmas Gifts for Women Men Kids

2Pack Rechargeable Hand Warmer, 8000mAh Electric Hand Warmer Power Bank, Portable USB-C Hand Warmer for Pocket, Reusable Hand Warmer Up to 8 hrs Each, Warm Gift for Men Women, for Hunting, Camping

GTOCE Portable Charger,40000mAh Power Bank with 22.5W Fast Charging LED Digital Display Battery Pack with 6 Outputs 2 Inputs, Type C Powerbank Portable Charger for iPhone 16 pro Samsung AirPods,Black

Monster Sleep Ear200, Wireless in-Ear Headphones, Bluetooth 6.0 Sleep Headphones, with ANC Active Noise Cancellation Designed for Side Sleepers, 30 Hours of bass Stereo Sound.

Monster Sleep Ear100 Ear Buds, Sleep Earbuds with Stereo Sound, Design for Side Sleeper, 32H Playtime, Bluetooth 6.0, ENC Noise Cancelling, IPX6 Waterproof Mini Headphones, White

Monster Sleep Ear100 Ear Buds, Sleep Earbuds with Stereo Sound, Design for Side Sleeper, 32H Playtime, Bluetooth 6.0, ENC Noise Cancelling, IPX6 Waterproof Mini Headphones, Black

Monster Sleep Ear100 Ear Buds, Sleep Earbuds with Stereo Sound, Design for Side Sleeper, 32H Playtime, Bluetooth 6.0, ENC Noise Cancelling, IPX6 Waterproof Mini Headphones, Black

Hydroponics Growing System Indoor Garden - Herb Garden with Grow Light, 15 Pods Stainless Steel Indoor Garden Kit, Auto Timer, Gardening Gift for All Ages

Umbra Triflora Hanging Planter for Window, Indoor Herb Garden, Set of 5, White/Black

Large Hydroponics Growing System 14 Pods, Indoor Herb Garden with LED Grow Light, 5L Water Tank, Hydroponic Grow Kit with 3 Auto-Timers, Rotatable Light Panel and Child Lock for Home School Gardening

Hanging Planter Hanging Plant Holder, 6 Inch 4 Indoor Plant Pots, Wall/Window Plant Hanger Indoor Herb Garden

slopehill Multi Hair Stylers & Hair Straightener - 2 in 1 Wet to Dry Air Straightener and Hair Dryer Combo with High Speed Air + Rapid Heat-Up + Customizable Temperature(Pink)

Hi.FANCY Portable Laptop Stand with Dual Cooling Fans for 14-17inch Laptops, Grey, 23.5 x 25.9 x 0.95cm

Laptop Stand for Desk, Adjustable Laptop Riser ABS+Silicone Foldable Portable Laptop Holder, Ventilated Cooling Notebook Stand for 10-15.6” Laptops,Tablet-Black

JETech 5 in 1 Case for Samsung Galaxy S25 Ultra 5G with 2-Pack Each Tempered Glass Screen Protector and Camera Lens Protector, Non-Yellowing Shockproof Bumper Phone Cover (Clear)

TAURI for iPhone 17 Pro Max Case 6.9" with 1-Pack Screen Protector, Camera Lens Full Protection, Military-Grade Protection, Shockproof Transparent Back Bumper Phone Cover - Clear Global Recycled Standard

TAURI for iPhone 17 Pro Case 6.3" with 1-Pack Screen Protector, Camera Lens Full Protection, Military-Grade Protection, Shockproof Transparent Back Bumper Phone Cover - Clear Global Recycled Standard

JOINPAYA 1Set Rechargeable Hand Warmer Hand Heater for Winter Heating Levels Compact

Shakven Rechargeable Hand Warmer | Cute Comfortable Portable Hand Warmers,Ergonomic Adjustable Energy-Efficient Small Heater for Travel, Outdoor, Winter

OCOOPA IP45 Waterproof Hand Warmer Rechargeable, Up to 15hrs Heat,10000mAh Durable Quick Charge Electric Hand Heater, PD Compatible, 3 Levels for Outdoors, Heavy Duty, H01-PD PRO

















