"The test results are out, there is no trace of artificial addition, it is all AI"
Previously, about 95% of the Dune Query was done by AI. This article focuses on DuneAI and how to use AI to efficiently engineer prompt words (AI intermodulation?). )
Part 1: A brief introduction to using Dune AI
@Dune built-in AI helps users quickly generate SQL queries using natural language. After creating a new query, you can see the prompt input slot at the bottom of the code block
Points of use:
1. Clearly express what you want to query in English, and provide context, including key information such as database, time range, specific contract address, token symbol, etc
- Example: "List all trades involving WETH (0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2) on Uniswap v3 in the past 24 hours"
2. Adjust your query requirements based on the initial results
- Dune AI has built-in test cases to ensure that the generated queries work correctly
- You can use the "fix" function at the top of the query code to modify and fine-tune based on existing queries
For more information, please refer to the official documentation:
Part II: Multi-Agent Prompt Word Project
In practice, relying on one AI tool alone often struggles to get the best results. The set of multi-agent collaborative Prompt Engineerimg processes introduced here can significantly improve query quality and efficiency, and can be extended to other business scenarios
Basic workflow
1. Mission Description: Start by articulating the business requirements
2. AI1 processing: Use general-purpose AI, such as ChatGPT or DeepSeek, to translate requirements into professional prompt words
3. AI2 execution: Enter the optimized prompt words into a professional AI (such as Dune AI) for execution
4. Outcome Evaluation: Check whether the preliminary results meet the needs
5. Iterative optimization: Adjust the prompt words as needed and repeat the above process
You can flexibly choose AI2 that is close to your business scenarios based on your needs, such as using Dune AI to generate queries, Copilot Claude 3 to complete programming tasks, and Grok 3 to retrieve and organize Twitter information
For example, my first prompt is:
“
I need to analyze the trading behavior of a specific token on the Solana chain to find out what is going on within the specified time frame:
1. Addresses that have bought more than N times
2. Addresses with a buy-in amount greater than X USD
3. Addresses with net inflows (total buys - total sells) greater than USD Y
4. Addresses that have not been sold more than Z times
Eventually, the details of these addresses will need to be returned, including:
- Wallet address
- Net inflow amount
- Number of buy-ins
- Number of sells
- Time of first trade
- Last trading time
- Token address
Please help me translate this requirement into a professional prompt word format that Dune AI can understand, including all necessary schema and parameter definitions; Use English; Related database documentation: (I have provided a description in here)
”
After that, I fine-tuned the second stage prompt and let Dune AI generate the query; I put the second stage prompt I used in the comment section
Hope this article was helpful to you
(Yes, this trick is also used in this article, and the images are all drawn with AI after generating the mermaid syntax)

Quickly produce "conspiracy pull addresses" in batches and export them through the Dune API
Preamble:
Take $USELESS from 2025-06-08 12:00 UTC to 2025-06-10 01:00, and the 15m volume will be increased to 40m from UTC 2025-06-08 to UTC 2025-06-10
I want to filter out all addresses that have bought more than 10,000 USD and have not sold during the time period
Sign up for a Dune account
Open the top right corner of Fork after Save
Take the name and copy your own query to make it easier to use the API
Continue below


Second Stage Prompt
Scheme: `dex_solana.trades`
Scheme Attributes:
block_time: timestamp, UTC timestamp of trade
amount_usd: double, unsigned USD value of the token traded
token_bought_mint_address: string, if token_mint_address here then the trade is identified as buy
token_sold_mint_address: string, if token_mint_address here then the trade is identified as sell
trader_id: string, wallet address
token_
Required Inputs:
token_mint_address: string, solana token mint address to filter;
start_datetime: date, start time;
end_datetime: date, end time. Both in utc time;
min_num_buys: number, minimal total number of buys within the time range;
min_amount_per_buy: number, minimal amount for each buy, in USD;
min_net_inflow: number, minimal amount summing inflow(total buy - total sell), in USD;
max_num_sells: number, maximal total number of sells within the time range;
Required Output :
wallet_address: strings, wallet addresses matching above fields .
net_inflow:number, signed total inflow
num_buys: number, number of buys within time range
num_sells:number, number of sells within time range
first_trade_datetime:date, datetime first trade within the time range
last_trade_datetime:date, last trade within the time range
token_mint_address: string
Write the SQL for me given the above requirements. Wrap the input parameters using double curly brackets {{}} in the SQL lines as placeholders.
18
5.19K
The content on this page is provided by third parties. Unless otherwise stated, OKX TR is not the author of the cited article(s) and does not claim any copyright in the materials. The content is provided for informational purposes only and does not represent the views of OKX TR. It is not intended to be an endorsement of any kind and should not be considered investment advice or a solicitation to buy or sell digital assets. To the extent generative AI is utilized to provide summaries or other information, such AI generated content may be inaccurate or inconsistent. Please read the linked article for more details and information. OKX TR is not responsible for content hosted on third party sites. Digital asset holdings, including stablecoins and NFTs, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition.