Skip to content

Add/update tutorials to use Flow Data Sources #1206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docs/evm/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: EVM Quickstart
description: Deploy your first contract on Flow testnet and connect it to a rainbowkit/wagmi/viem app
sidebar_position: 2
sidebar_position: 5
keywords:
- Flow EVM
- EVM quickstart
Expand Down Expand Up @@ -332,14 +332,12 @@ In our [Cross-VM Apps] tutorial series, you'll learn how to supercharge your EVM

Ready to unlock the full potential of Flow EVM? Start with our [Batched Transactions] tutorial to learn how to build your first cross-VM application.

<!-- Relative links, will not render on page -->

[Cadence]: https://cadence-lang.org/docs
[Next.js]: https://nextjs.org/docs/app/getting-started/installation
[wagmi]: https://wagmi.sh/
[viem]: https://viem.sh/
[rainbowkit]: https://www.rainbowkit.com/
[hardhat]: https://hardhat.org/
[Hardhat]: https://hardhat.org/
[Remix]: ./guides/remix.md
[Foundry]: ./guides/foundry.md
[Flow Faucet]: https://faucet.flow.com/fund-account
Expand All @@ -355,3 +353,4 @@ Ready to unlock the full potential of Flow EVM? Start with our [Batched Transact
[testnet Flowscan]: https://evm-testnet.flowscan.io/
[Cross-VM Apps]: ../tutorials/cross-vm-apps/introduction.md
[Batched Transactions]: ../tutorials/cross-vm-apps/introduction.md
[OpenZeppelin Contracts]: https://www.openzeppelin.com/contracts
Binary file added docs/tutorials/ai-plus-flow/chatgpt/create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions docs/tutorials/ai-plus-flow/chatgpt/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: Use Flow Knowledge Base in ChatGPT
sidebar_label: Use ChatGPT
sidebar_position: 2
keywords:
- ChatGPT
- AI
- OpenAI
- Flow documentation
- Cadence documentation
- Flow development
- Flow tools
- Flow IDE
- Flow setup
- Flow configuration
- Flow AI assistance
---

# Use Flow Knowledge Base in ChatGPT

[ChatGPT] is an AI assistant developed by [OpenAI] that can help with tasks such as writing, coding, and answering questions. It adapts to context and user input to provide relevant, conversational responses. ChatGPT can be integrated into developer tools or workflows to assist with documentation, debugging, and productivity.

This guide walks you through creating a **Custom GPT** using ChatGPT that can reference the [Flow Data Sources] file to answer questions.

:::warning

You'll need a [ChatGPT Plus subscription] to use the **Custom GPT** feature.

:::

## 📍 Step 1: Open the "Explore GPTs" Section

1. Log in to [ChatGPT].
2. In the sidebar on the left, click **Explore GPTs**.

![explore gpts](explore-gpts.png)

---

## 📍 Step 2: Click "Create a GPT"

1. In the **Explore GPTs** screen, click the **"Create"** button in the top-right corner.

![create](create.png)

---

## 📍 Step 3: Walk Through the GPT Builder

ChatGPT will now guide you through a conversation to set up your custom GPT. First, drag and drop the [Flow Data Sources All Merged] file into the prompt.

### Suggested Prompt

```text
I want to make a GPT called FlowGPT that uses the linked file as it's primary source. This file changes, so it should reference the live file at least once a day: https://github.com/onflow/Flow-Data-Sources/blob/main/merged_docs/all_merged.md
```

---

## 📍 Step 4: Configure the GPT's Name and Instructions

ChatGPT may ask you to customize or verify:

- **Name and description** of your GPT
- **Instructions**: Tell it how to behave and what to prioritize (e.g., always reference the uploaded document)
- **Capabilities**: Enable file browsing, code interpreter, or DALL·E if needed

We've found it helpful to suggest:

```text
Please imagine you are a fast and smart junior developer who is eager to help and has memorized all the information in the linked file
```

Please let us know if you find any other useful customization prompts!

---

## 📍 Step 5: Test Your GPT

Once the GPT is built, you'll be taken to a preview chat window. Test it by asking a few questions based on your uploaded document.

---

## 📍 Step 6: Save and Publish (Optional)

When you're ready:

- Click **"Update & Save"** to finalize
- You can choose to keep it **private** or make it **public**

---

## ✅ That's it!

You've now created a custom GPT that references your uploaded file as a primary source. You can update the file or instructions later if needed.

[ChatGPT]: https://chatgpt.com/
[OpenAI]: https://openai.com/
[ChatGPT Plus subscription]: https://chat.openai.com
[Flow Data Sources]: ../flow-data-sources.md
[Flow Data Sources All Merged]: https://github.com/onflow/Flow-Data-Sources/blob/main/merged_docs/all_merged.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Use Flow Knowledge Base in Cursor
sidebar_label: Use Cursor AI
sidebar_position: 1
keywords:
- Cursor
- AI
Expand All @@ -14,31 +15,44 @@ keywords:
- Flow AI assistance
---

[Cursor](https://www.cursor.com/) is an AI code editor that makes it easy to write code while building Flow apps.
Let's walk through how to setup Cursor for the best possible experience when writing applications on Flow.
# Use Flow Knowledge Base in Cursor

[Cursor] is an AI code editor that makes it easy to write code while building Flow apps. Let's walk through how to setup Cursor for the best possible experience when writing applications on Flow.

## Installation

Adding Flow docs lets you interact with our docs directly and get the most accurate answers to your questions.

1. Go to Cursor Settings > Features > Docs and click "+ Add new doc".
![Cursor Settings](./images//use-cursor-1.png)
2. Set Flow Docs:

![Cursor Settings](./images//use-cursor-1.png)

1. Set Flow Docs:

- Enter the URL of the Flow docs: `https://developers.flow.com/tools` and press Enter.
- Note: This **will index all** the docs. We're investigating why you need `/tools`
- Cursor will automatically detect the Flow docs and index them for you.
- Ensure the name is `Flow`, and click "Confirm" to add the docs.
![Cursor Settings](./images//use-cursor-2.png)

3. Set Cadence Docs: (Optional, but recommended)
- Click "+ Add new doc" again, now enter the URL of the Cadence docs: `https://cadence-lang.org/docs/` and press Enter.
- Same process as before, ensure the name is `Cadence`, and click "Confirm" to add the docs.
4. Now wait for Cursor to index the docs. You can check the progress in the Docs section of the settings. After the indexing is complete, you can start using the docs in Cursor.
![Cursor Settings](./images//use-cursor-2.png)

1. Set Cadence Docs:

- Click "+ Add new doc" again, now enter the URL of the Cadence docs: `https://cadence-lang.org/docs/` and press Enter.
- Same process as before, ensure the name is `Cadence`, and click "Confirm" to add the docs.

1. Add [Flow Data Sources]:
Click "+ Add new doc" one more time and enter the URL of our massive, auto-generated file with the most current data and practices for Flow and Cadence: `https://github.com/onflow/Flow-Data-Sources/blob/main/merged_docs/all_merged.md` and press Enter.

- Enter `Flow Data Sources`, and click "Confirm" to add the doc.
- **Caution**: This file is very large. For older development machines, you may wish to use the [essentials merged] file instead.

1. Now wait for Cursor to index the docs. You can check the progress in the Docs section of the settings. After the indexing is complete, you can start using the docs in Cursor.

## Using Flow Docs in Cursor

You can then reference the Flow docs in your prompt with the `@Flow` symbol or `@Cadence` for the Cadence docs.
You can then reference the Flow docs in your prompt with the `@Flow`, `@Cadence`or `@Flow Data Sources` docs.

![Cursor Settings](./images//use-cursor-3.png)

## Best Practices
Expand All @@ -47,6 +61,7 @@ When using Cursor with Flow documentation:

- Use `@Flow` when asking questions about Flow-specific concepts, tools, or ecosystem
- Use `@Cadence` when asking questions about Cadence programming language syntax or features
- Use `@Flow Data Sources` when asking about complex questions, difficult tasks, or anything that the first two sources didn't provide a satisfactory result
- Be specific in your prompts to get more accurate and relevant answers
- Combine both `@Flow` and `@Cadence` when working on cross-VM applications
- Use the documentation to verify AI-generated code and ensure best practices
Expand All @@ -55,8 +70,12 @@ When using Cursor with Flow documentation:

If you encounter any issues:

1. Ensure both Flow and Cadence docs are properly indexed
1. Ensure all three sources are properly indexed
2. Try refreshing the documentation if answers seem outdated
3. Check your internet connection as Cursor needs to access the documentation
4. Verify the URLs are correct in your settings
5. Contact Cursor support if issues persist

[Cursor]: https://www.cursor.com/
[Flow Data Sources]: ../flow-data-sources.md
[essentials merged]: https://github.com/onflow/Flow-Data-Sources/blob/main/merged_docs/essentials_merged.md
65 changes: 65 additions & 0 deletions docs/tutorials/ai-plus-flow/flow-data-sources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: Flow Data Sources
sidebar_label: Flow Data Sources
sidebar_position: 3
keywords:
- Flow Data Sources
- AI knowledge base
- Flow documentation
- Cadence documentation
- Flow development
- Flow tools
- Flow AI assistance
- RAG
- Retrieval-Augmented Generation
---

# Flow Data Sources

Flow Data Sources is a comprehensive repository that automatically aggregates and formats Flow ecosystem content into Markdown files optimized for AI ingestion. This resource serves as a centralized knowledge base for AI tools, chatbots, and RAG (Retrieval-Augmented Generation) pipelines.

## Overview

The repository contains Python scripts that:

- Crawl Flow-related documentation sites, GitHub repositories, and discussions
- Convert HTML content to Markdown format
- Extract code examples from GitHub repositories
- Capture community discussions and Q&A content
- Merge all content into consolidated files for easy consumption

## Key Features

- **Daily Updates**: Content is automatically refreshed to ensure the latest information
- **Structured Format**: All content is converted to Markdown for consistent processing
- **Comprehensive Coverage**: Includes official documentation, code examples, and community discussions
- **Optimized for AI**: Designed specifically for AI tools, chatbots, and RAG pipelines
- **Two Output Options**:
- `all_merged.md`: Complete content including code blocks
- `essentials_merged.md`: Streamlined version without code blocks

## How to Use

Flow Data Sources can be integrated with:

- **ChatGPT Plugins**: Enhance Q&A capabilities with Flow-specific knowledge
- **Custom Chatbots**: Power Discord/Telegram bots with accurate Flow information
- **RAG Systems**: Index content in vector databases for semantic search
- **Development Tools**: Provide context-aware assistance in IDEs like Cursor

## Accessing the Content

The merged documentation files are available at:

- [All Merged Content][all-merged]
- [Essentials Only][essentials-merged]

For integration with AI tools like Cursor or ChatGPT, use the appropriate URL as described in the respective tutorials:

- [Use Flow Knowledge Base in Cursor][cursor] - Learn how to set up Cursor with Flow knowledge bases
- [Use Flow Knowledge Base in ChatGPT][chatgpt] - Create a custom GPT that understands Flow and Cadence

[all-merged]: https://github.com/onflow/Flow-Data-Sources/blob/main/merged_docs/all_merged.md
[essentials-merged]: https://github.com/onflow/Flow-Data-Sources/blob/main/merged_docs/essentials_merged.md
[cursor]: ./cursor/index.md
[chatgpt]: ./chatgpt/index.md
59 changes: 59 additions & 0 deletions docs/tutorials/ai-plus-flow/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: AI Plus Flow
description: Learn how to leverage AI tools to enhance your Flow development experience
sidebar_position: 2
keywords:
- AI
- ChatGPT
- Cursor
- Flow documentation
- Cadence documentation
- Flow development
- Flow tools
- Flow IDE
- Flow setup
- Flow configuration
- Flow AI assistance
---

# AI Plus Flow

Artificial Intelligence tools can significantly enhance your Flow development experience by providing intelligent assistance, code generation, and documentation access. This tutorial series will guide you through integrating various AI tools with Flow development to boost your productivity and code quality.

## What You'll Learn

In this tutorial series, you'll discover how to:

- Configure AI-powered development environments for Flow
- Access Flow documentation directly from AI assistants
- Generate Cadence and Solidity code with AI assistance
- Debug and troubleshoot Flow applications with AI support
- Leverage AI for testing and optimization

## Tutorials

- **[Use Flow Knowledge Base in Cursor][cursor]** - Learn how to set up Cursor with Flow knowledge bases to get intelligent assistance while developing Flow applications.
- **[Use Flow Knowledge Base in ChatGPT][chatgpt]** - Create a custom GPT that understands Flow and Cadence to provide accurate answers to your development questions.
- **[Flow Data Sources][flow-data-sources]** - Learn about this comprehensive resource and how to integrate it with various AI platforms.

## Best Practices

When using AI tools with Flow development:

- Always verify AI-generated code against Flow documentation
- Use specific prompts that reference Flow concepts and terminology
- Combine AI assistance with your own understanding of Flow architecture
- Keep your AI tools updated with the latest Flow documentation
- Test AI-generated code thoroughly before deploying to production

## Next Steps

After completing these tutorials, you'll be equipped to leverage AI tools effectively in your Flow development workflow. Consider exploring our other tutorial series to deepen your understanding of Flow development:

- [Cross-VM Apps][cross-vm-apps] - Build applications that integrate Flow EVM and Cadence
- [Native VRF][native-vrf] - Implement verifiable random functions in your applications
- [Token Launch][token-launch] - Create and launch tokens on Flow

[cross-vm-apps]: ../cross-vm-apps/introduction.md
[native-vrf]: ../native-vrf/index.md
[token-launch]: ../token-launch/index.md
2 changes: 1 addition & 1 deletion docs/tutorials/flowtobooth/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 3
title: FlowtoBooth Tutorials
title: FlowtoBooth
description: Learn how to build apps that showcase Flow's unique capabilities through fun benchmark applications.
keywords:
- tutorials
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/token-launch/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 2
title: Token Launch
description: Learn how to register your tokens on Flow to ensure visibility in wallets and ecosystem projects.
---
Expand Down
5 changes: 5 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,11 @@
"source": "/tools/vscode-extension/cursor",
"destination": "/tools/cursor",
"permanent": true
},
{
"source": "/tools/cursor",
"destination": "tutorials/ai-plus-flow/cursor",
"permanent": true
}
]
}