AWS Builder Center
The Use Case Generator Agent

The Use Case Generator Agent

Part of the Zero to Operational for Amazon Neptune using Agentic AI series. This agent assists you in generating a detailed use case to build your solution.

Agent Goals

The first agent in our workflow is the Use Case Generator Agent. Here we provide an agent with a topic and let it generate a first draft of the use case we want our graph to solve.

Our Sample Workflow

For our series, we are using the topic Anti-Money Laundering and Financial Crime Investigation.
The output from this agent in our sample was (new-lines added for readability):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Anti-money laundering and financial crime investigation involves tracking
complex webs of financial transactions across multiple accounts, institutions,
and entities to identify suspicious patterns that may indicate money laundering,
fraud, or other illicit activities. Graph databases are optimal for this use
case because financial crimes typically involve intricate networks of shell
companies, intermediary accounts, and circular transaction patterns that are
designed to obscure the money trail. Traditional relational databases struggle
to efficiently analyze multi-hop relationships and detect sophisticated layering
schemes where money moves through numerous accounts to distance it from its
illegal source. Graph databases can rapidly traverse transaction networks,
identify unusual patterns like structuring or rapid movement of funds, and
uncover hidden connections between seemingly unrelated entities through
beneficial ownership, shared addresses, or transaction timing patterns.

Questions:
- Which accounts are participating in circular transaction patterns that could
indicate layering activity in money laundering schemes?
- What are the shortest paths connecting a flagged high-risk entity to other
accounts that received funds within a specific time window?
- Which shell companies or intermediary accounts appear most frequently in
transaction paths between known suspicious entities?
We can use this use case description and questions we want to answer as-is, or customize it manually before sending it to our next agent .

Agent Components

Let's look at the key components of the Use Case Generator Agent. The prompts shown here were tested with Anthropic Claude 3.7 and 4.0.

System Prompt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
You are an expert on defining graph use cases for a provided topic. You explain to the user:
- a scenario where graphs are an optimal way to solve the problem
- the types of data that can be used in the use case
- three questions relevant to the use case that the graph can be used to answer

Here is an example of what the output might look like:
<user>
Here is the use case:
Social Media Network Analysis
</user>
<response>
Social media platforms generate vast amounts of interconnected data where users follow each other, share content, join groups, and interact through likes, comments, and shares. A graph database excels at modeling these complex relationships between users, posts, hashtags, and communities. The network effect is crucial for understanding influence patterns, content virality, and user engagement. Traditional relational databases struggle with the multi-hop queries needed to find connections like "friends of friends" or to analyze how information spreads through the network. Graph databases can efficiently traverse these relationships to provide real-time recommendations, detect communities, and identify influential users.
Questions:
- Which users have the most influence in spreading content about a specific topic?
- What are the shortest connection paths between two users in different geographic regions?
- Which hashtags are most likely to go viral based on the network structure of users who initially share them?
</response>

ALWAYS:
- provide the description for the use case
- provide the 3 questions

NEVER:
- Add commentary to the output
- Add explanations to why you answered that way

Tools

None

User Message Template

1
2
Here is the use case:
{use_case_topic}

What's Next

If you are just getting started building a graph solution on Amazon Neptune, create this agent using your favorite agentic AI framework (personally I use Strands Agents SDK ) and LLM and use it as an advisor in defining what your graph should do. In the next article, we will describe an agent that will use this output to design a graph model. Have you implemented ways to improve this or have ideas on how to do so? Share them in the comments or reach out to me directly on LinkedIn .

Disclaimer

These prompts and agent ideas are not supported products in their own right, but educational examples to help Neptune customers use build their applications. Before introducing these prompts and agents into our organization, the methods described should be thoroughly tested, secured, and optimized according to your business's security standards & policies.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article