Skip to content

Grocery Shopping Agent

Premise

I am experimenting with creating prompts that can be executed on a regular basis. Is this agentic? I have no idea, but I am trying to get there. This particular task is a pragmatic one; if I need groceries, what are my local prices on staples?

Overview

This project uses a simple grocery task to solve a complex data problem: how to turn messy, “unstructured” information into something a business can actually use.

In the Hyland world, this is exactly what the Content Innovation Cloud (CIC) does when it takes thousands of random emails or PDFs and uses Knowledge Enrichment to make them “AI-ready.” By building this butter price tracker, I’m essentially creating a small-scale version of a Hyland AI Agent, a tool that doesn’t just store data, but reaches out, organizes it, and gives us a clear answer on the best next move. It proves that the same logic Hyland uses for massive enterprise workflows can be applied to any practical problem where we need to stop digging through files and start making faster, data-backed decisions.


Why this matters for us

  • Data Readiness: Just as I had to structure store data for this project, Hyland’s Knowledge Discovery helps us “clean” our existing OnBase content so AI can actually understand it.
  • Decision Support: The project isn’t about the butter; it’s about the logic engine. It demonstrates how we can move from “having information” to “having answers” without manual effort.
  • Pragmatic ROI: This shows that AI isn’t just for abstract “chatbots”—it’s a tool for specific, high-value automation that saves time on repetitive research.

Getting Started

I took some time to refine this prompt, and came up with the following results. The prompt is shown in the next section.

The Prompt

# Role You are the "Daro Family Shopping Assistant." Your goal is to provide a highly accurate, link-verified local price report. 
# Verification Protocol (Crucial) 1. ONLY use prices from direct retailer websites (Walmart.com, Target.com, GiantFood.com, etc.). 2. If a specific price cannot be verified for the exact address, use the nearest regional store and clearly note "(Regional Price)." 3. Prioritize "Shelf Price" over "Delivery/Instacart Price" to ensure the best in-store value. 
# Target Locations - Supermarkets: Giant Food (6020 Marshalee Dr), Harris Teeter (8184 Westside Blvd), Safeway (4370 Montgomery Rd), Wegmans (8855 McGaw Rd), Whole Foods (10275 Little Patuxent Pkwy), Giant Food (8805 Centre Park Dr), Target (4390 Montgomery Rd), Walmart Supercenter (6405 Dobbin Rd). - Gas Stations: Shell (5651 Waterloo Rd), Exxon (8251 Snowden River Pkwy), Exxon (6070 Marshalee Dr), Exxon (8850 Centre Park Dr), Costco Gasoline (6675 Marie Curie Dr). 
# Items to Track - 1 Gal Milk, 1 Doz Eggs, 1 Loaf Bread, 12oz Coffee, 1lb 80/20 Beef, 1lb Turkey, 1lb Chicken Thighs, 1 Gal Regular Gas. 
# Formatting Rules 1. Title: **Daily Price Report** 2. Table Columns: [Item | Store Name | Street Address | Best Price | Trend]. 3. Best Price Column: Use a clickable link to the product page, followed by the brand in (). 4. Bold: Headers only. No bold in data rows. 5. Insights: Post-table summary of top BOGO deals and gas lows. 
# Tone Concise, helpful, and strictly grounded in factual data. Avoid personal narratives or unsolicited advice.

Protocycling

I am now in protocycle mode. I have this prompt running every day at 6am (which is very easy to do on Gemini, BTW) so when I get to work, I can look a the results. A few times a week, when we are planning the grocery list, we compare against this report. Gemini took some liberties and prettied up the results.

Decision Tree

So far, its missing a lot of good prices, but so far…always because of something I told it. I have added to the prompt, asking Gemini to report on how it arrived at certain prices, so I can see how and why it made its decision.

Decision NodeBranch TakenReasoning / Logic
Marketplace FilterDiscard 3rd PartyInitial search results sometimes show “Marketplace” bulk or organic options from $4.04 to $7.87. These were discarded to find the standard in-store floor.
Fulfillment AuditIn-Store/Pickup OnlyVerified $2.92 as the official price for Great Value 1% Low-Fat, 2% Reduced Fat, and Whole Milk at the 6405 Dobbin Rd location.
Comparison LoopCross-Store CheckCompared against Target ($3.39) and Giant Food ($3.56). Walmart provided the lowest verified unit price.
NormalizationGallon vs. Half-GallonHalf-gallons are priced at $1.76 ($3.52/gal equivalent). The full gallon ($2.92) was selected as the true unit price winner.
SelectionWalmart ($2.92)Passed all local, store-shipped, and unit-low criteria.

These checkpoints are often revealing, showing some decision point that I did not consider. This process of checking, verifying, and rechecking is allowing me to evolve the prompt, and the results are improving.

Take Away: You won’t get your results on the first try. Keep refining your prompts. Let the model help you refine it.

Convenience Pivot

Yesterday, I began experimenting with a Convenience Pivot. My wife was heading up to Target to grab a few things. If a supermarket in the same location has a better price than Target, is it worth the time to go to two stores?

Prompt: Ok, now I want to try a sidequest. My wife is headed to Target today, knowing that a similar but not better price at Target may be worth it to avoid another store. Can you factor that in and add…somehow…THIS is the best price but at Target…
Take Away: Once we have a basic anchor, we can build on top of it. The logic is already looking at prices and ranking them, so adding the second price for comparison is not that difficult.

Version 5 of The Prompt

At the end of every session with an LLM, I try to generate an anchor prompt. I have also started using version control to help me manage the improvements.

# Role: Daro Family Shopping Assistant (MD Specialist) 
# Version: 5.0 
# Objective: Generate a real-time, link-verified price audit for the Daro household. Prioritize the absolute lowest unit price (normalized) while providing a "Convenience Pivot" for Target trips. 
# Execution Protocol (The Logic Gate): 1. NO LINK, NO VALIDITY: Every price MUST have a direct product page link. No link = discard result. 2. MARKETPLACE FILTER: Use ONLY "Sold & Shipped by [Retailer]" prices. Strictly discard all 3rd-party marketplace sellers. 3. DOMAIN LOCKDOWN: For Giant Food, use ONLY "giantfood.com". Discard all "giantfoodstores.com" (PA region) results. 4. MEAT INTEGRITY: Beef = 80/20 fat ratio. Turkey = Plain/Unseasoned. Chicken = Boneless/Skinless Thighs (BST). 5. UNIT NORMALIZATION: Identify the bulk winner (e.g., 10lb beef roll vs 1lb tray) to find the true unit price floor. 6. TARGET SIDEQUEST: Always calculate a "Convenience Pivot" for Target. Show the Best Target Price vs. the Regional Low and calculate the "Convenience Tax" (difference). 
# Required Format: - Title: 
# **Daily Price Report: [Current Day], [Current Date] at [Current Time]** - Primary Table: [Item | Best Price (Any Allowed Store) | Convenience Pivot: Best at Target | Convenience Tax] - Data Entry Style: Link + Brand in parentheses (e.g., [$2.00](URL) (Store Brand)). No bold text in data rows. - Decision Tree Log: Summary table detailing Action Taken, Reasoning, and Rejections. - Local Market Insights: Bulleted list of BOGO offers, fuel strategy, and regional deals.

Continued Refinement

Gemini allows you to set up a prompt and have it execute on a regular basis. I have the Best Butter Prices Locally task running every day at 6am, so I can look at results each day.

Today, I am starting with the milk. I clicked the link that Gemini gave me, and it shows milk for $1.98 per gallon. It’s time to look at the decision tree. Why did it not find this better price? It even gave the link to it, to me!!?!?!

I asked for an explanation on why I was finding a better price.

This is interesting. I thought I had already set down the rule that the local price reigns supreme, but apparently I was not succinct enough in my description.

Take Away: It’s becoming clear to me that if you ask a model to do x, it will do its best to distill the finer steps but only as much as it needs to, to reach the goal. Continually asking, “
”How did you arrive at that decision?” and then making tweaks to the lower steps, seems to filter better results at the top.

Leave a Reply