docs(nx-cloud): improve AI feature pages

This commit is contained in:
Juri 2024-08-12 23:11:56 +02:00 committed by Juri Strumpflohner
parent fd74969367
commit 59280014c6
16 changed files with 239 additions and 249 deletions

View File

@ -207,28 +207,6 @@
"path": "/ci/features/distribute-task-execution",
"tags": []
},
{
"id": "nx-cloud-ai",
"name": "Nx Cloud AI",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"mediaImage": "",
"file": "nx-cloud/features/ai-features",
"itemList": [],
"isExternal": false,
"path": "/ci/features/nx-cloud-ai",
"tags": []
},
{
"id": "dynamic-agents",
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"mediaImage": "",
"file": "nx-cloud/features/dynamic-agents",
"itemList": [],
"isExternal": false,
"path": "/ci/features/dynamic-agents",
"tags": []
},
{
"id": "split-e2e-tasks",
"name": "Automatically Split E2E Tasks (Atomizer)",
@ -250,6 +228,28 @@
"isExternal": false,
"path": "/ci/features/flaky-tasks",
"tags": []
},
{
"id": "dynamic-agents",
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"mediaImage": "",
"file": "nx-cloud/features/dynamic-agents",
"itemList": [],
"isExternal": false,
"path": "/ci/features/dynamic-agents",
"tags": []
},
{
"id": "explain-with-ai",
"name": "Explain With AI",
"description": "",
"mediaImage": "",
"file": "nx-cloud/features/explain-with-ai",
"itemList": [],
"isExternal": false,
"path": "/ci/features/explain-with-ai",
"tags": []
}
],
"isExternal": false,
@ -289,28 +289,6 @@
"path": "/ci/features/distribute-task-execution",
"tags": []
},
"/ci/features/nx-cloud-ai": {
"id": "nx-cloud-ai",
"name": "Nx Cloud AI",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"mediaImage": "",
"file": "nx-cloud/features/ai-features",
"itemList": [],
"isExternal": false,
"path": "/ci/features/nx-cloud-ai",
"tags": []
},
"/ci/features/dynamic-agents": {
"id": "dynamic-agents",
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"mediaImage": "",
"file": "nx-cloud/features/dynamic-agents",
"itemList": [],
"isExternal": false,
"path": "/ci/features/dynamic-agents",
"tags": []
},
"/ci/features/split-e2e-tasks": {
"id": "split-e2e-tasks",
"name": "Automatically Split E2E Tasks (Atomizer)",
@ -333,6 +311,28 @@
"path": "/ci/features/flaky-tasks",
"tags": []
},
"/ci/features/dynamic-agents": {
"id": "dynamic-agents",
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"mediaImage": "",
"file": "nx-cloud/features/dynamic-agents",
"itemList": [],
"isExternal": false,
"path": "/ci/features/dynamic-agents",
"tags": []
},
"/ci/features/explain-with-ai": {
"id": "explain-with-ai",
"name": "Explain With AI",
"description": "",
"mediaImage": "",
"file": "nx-cloud/features/explain-with-ai",
"itemList": [],
"isExternal": false,
"path": "/ci/features/explain-with-ai",
"tags": []
},
"/ci/concepts": {
"id": "concepts",
"name": "Concepts",
@ -383,6 +383,17 @@
"isExternal": false,
"path": "/ci/concepts/cache-security",
"tags": []
},
{
"id": "nx-cloud-ai",
"name": "Nx Cloud AI",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"mediaImage": "",
"file": "nx-cloud/concepts/ai-features",
"itemList": [],
"isExternal": false,
"path": "/ci/concepts/nx-cloud-ai",
"tags": []
}
],
"isExternal": false,
@ -433,6 +444,17 @@
"path": "/ci/concepts/cache-security",
"tags": []
},
"/ci/concepts/nx-cloud-ai": {
"id": "nx-cloud-ai",
"name": "Nx Cloud AI",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"mediaImage": "",
"file": "nx-cloud/concepts/ai-features",
"itemList": [],
"isExternal": false,
"path": "/ci/concepts/nx-cloud-ai",
"tags": []
},
"/ci/recipes": {
"id": "recipes",
"name": "Recipes",
@ -1997,17 +2019,6 @@
"isExternal": false,
"path": "/ci/troubleshooting/ci-execution-failed",
"tags": []
},
{
"id": "explain-with-ai",
"name": "Explain With AI",
"description": "",
"mediaImage": "",
"file": "nx-cloud/troubleshooting/explain-with-ai",
"itemList": [],
"isExternal": false,
"path": "/ci/troubleshooting/explain-with-ai",
"tags": []
}
],
"isExternal": false,
@ -2024,16 +2035,5 @@
"isExternal": false,
"path": "/ci/troubleshooting/ci-execution-failed",
"tags": []
},
"/ci/troubleshooting/explain-with-ai": {
"id": "explain-with-ai",
"name": "Explain With AI",
"description": "",
"mediaImage": "",
"file": "nx-cloud/troubleshooting/explain-with-ai",
"itemList": [],
"isExternal": false,
"path": "/ci/troubleshooting/explain-with-ai",
"tags": []
}
}

View File

@ -5413,9 +5413,17 @@
"disableCollapsible": false
},
{
"name": "Nx Cloud AI",
"path": "/ci/features/nx-cloud-ai",
"id": "nx-cloud-ai",
"name": "Automatically Split E2E Tasks (Atomizer)",
"path": "/ci/features/split-e2e-tasks",
"id": "split-e2e-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Identify and Re-run Flaky Tasks",
"path": "/ci/features/flaky-tasks",
"id": "flaky-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
@ -5429,17 +5437,9 @@
"disableCollapsible": false
},
{
"name": "Automatically Split E2E Tasks (Atomizer)",
"path": "/ci/features/split-e2e-tasks",
"id": "split-e2e-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Identify and Re-run Flaky Tasks",
"path": "/ci/features/flaky-tasks",
"id": "flaky-tasks",
"name": "Explain With AI",
"path": "/ci/features/explain-with-ai",
"id": "explain-with-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
@ -5472,9 +5472,17 @@
"disableCollapsible": false
},
{
"name": "Nx Cloud AI",
"path": "/ci/features/nx-cloud-ai",
"id": "nx-cloud-ai",
"name": "Automatically Split E2E Tasks (Atomizer)",
"path": "/ci/features/split-e2e-tasks",
"id": "split-e2e-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Identify and Re-run Flaky Tasks",
"path": "/ci/features/flaky-tasks",
"id": "flaky-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
@ -5488,17 +5496,9 @@
"disableCollapsible": false
},
{
"name": "Automatically Split E2E Tasks (Atomizer)",
"path": "/ci/features/split-e2e-tasks",
"id": "split-e2e-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Identify and Re-run Flaky Tasks",
"path": "/ci/features/flaky-tasks",
"id": "flaky-tasks",
"name": "Explain With AI",
"path": "/ci/features/explain-with-ai",
"id": "explain-with-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
@ -5540,6 +5540,14 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Nx Cloud AI",
"path": "/ci/concepts/nx-cloud-ai",
"id": "nx-cloud-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
@ -5576,6 +5584,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Nx Cloud AI",
"path": "/ci/concepts/nx-cloud-ai",
"id": "nx-cloud-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Recipes",
"path": "/ci/recipes",
@ -6719,14 +6735,6 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Explain With AI",
"path": "/ci/troubleshooting/explain-with-ai",
"id": "explain-with-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
@ -6738,14 +6746,6 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Explain With AI",
"path": "/ci/troubleshooting/explain-with-ai",
"id": "explain-with-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
]
},

View File

@ -1647,18 +1647,6 @@
"description": "Learn how to efficiently distribute tasks across machines to take full advantage of parallelization. Nx Agents make this a trivial task.",
"file": "shared/features/distribute-task-execution"
},
{
"name": "Nx Cloud AI",
"id": "nx-cloud-ai",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"file": "nx-cloud/features/ai-features"
},
{
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"id": "dynamic-agents",
"file": "nx-cloud/features/dynamic-agents"
},
{
"name": "Automatically Split E2E Tasks (Atomizer)",
"id": "split-e2e-tasks",
@ -1670,6 +1658,17 @@
"id": "flaky-tasks",
"description": "Learn how Nx Cloud is able to automatically identify flaky tasks and re-run them for you.",
"file": "nx-cloud/features/flaky-tasks"
},
{
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"id": "dynamic-agents",
"file": "nx-cloud/features/dynamic-agents"
},
{
"name": "Explain With AI",
"id": "explain-with-ai",
"file": "nx-cloud/features/explain-with-ai"
}
]
},
@ -1700,6 +1699,12 @@
"name": "Cache Security",
"id": "cache-security",
"file": "nx-cloud/concepts/cache-security"
},
{
"name": "Nx Cloud AI",
"id": "nx-cloud-ai",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"file": "nx-cloud/concepts/ai-features"
}
]
},
@ -1964,11 +1969,6 @@
"name": "CI Execution Failed",
"id": "ci-execution-failed",
"file": "nx-cloud/troubleshooting/ci-execution-failed"
},
{
"name": "Explain With AI",
"id": "explain-with-ai",
"file": "nx-cloud/troubleshooting/explain-with-ai"
}
]
}

View File

@ -0,0 +1,51 @@
# Nx Cloud AI
Nx Cloud AI offers a suite of features designed to **enhance your development workflow with AI-driven capabilities**. These tools assist in troubleshooting, optimizing resource allocation, and improving your overall development process.
- **[Explain with AI](/ci/features/explain-with-ai)** - This feature uses AI to provide detailed explanations about failed tasks.
- **Automatic Resource Allocation** (Coming Soon) - This upcoming feature will use custom AI/ML models to dynamically allocate resources based on your projects specific needs. It optimizes performance by efficiently assigning Nx Agents to achieve target durations for main and PR branches.
## Enable Nx Cloud AI Features
To enable AI features for your organization, go to your organization's settings on [Nx Cloud](https://cloud.nx.app/orgs?utm_source=nx.dev&utm_campaign=ai) and select the organization where you want to enable AI.
In the **settings** menu, find the "AI Features" section and toggle it to "On".
![enable ai features](/nx-cloud/features/ai-features.png)
Ensure that you **accept the AI terms** to start using the AI features.
{% callout type="info" title="AI Features Availability" %}
AI features are available only for the [Nx Cloud Pro plan](/pricing). If you are on the Hobby plan, you can start a free trial to test AI features in your workspace.
{% /callout %}
### Enable AI Features for Enterprise On-Prem Installations
To enable AI features for enterprise on-prem installations, add the following configuration to your `helm-values.yaml` file:
```yaml
nxApi
deployment:
env:
- name: NX_CLOUD_AI_ENABLED
value: 'true'
frontend
deployment:
env:
- name: OPENAI_SECRET_KEY
valueFrom:
secretKeyRef:
name: open-ai-secrets
key: OPENAI_SECRET_KEY
- name: NX_CLOUD_AI_ENABLED
value: 'true'
```
Ensure your OpenAI secret key is correctly configured to provide the necessary credits for `gpt-3.5-turbo` and `gpt-4`.
### Regional Availability
This feature is not available for the EU cluster in public cloud installations due to regional restrictions. However, on-prem customers in the EU can still use this feature by providing their own OpenAI secret key and enabling the required environment variables.

View File

@ -1,37 +0,0 @@
# Nx Cloud AI
To use AI in Nx Cloud, you need to enable AI features in your organization settings. This will unlock advanced capabilities designed to enhance your development workflow.
### How to Enable AI Features
1. **Navigate to Organization Settings**:
- Go to your [Nx Cloud dashboard](https://cloud.nx.app/orgs?utm_source=nx.dev&utm_campaign=ai).
- Select your organization from the list.
- Access the settings by clicking on the settings icon.
2. **Enable AI Features**:
- In the settings menu, locate the **AI Features** section.
- Toggle the setting to **On**.
![enable ai features](/nx-cloud/features/ai-features.png)
3. **Accept AI Terms**:
- Once the AI features are enabled, a terms and conditions prompt will appear.
- Review and accept the terms and conditions related to AI usage to proceed.
### AI Driven Capabilities
Once AI features are enabled, you gain access to several powerful tools designed to optimize your development process:
#### Explain with AI
This feature leverages AI to provide detailed explanations and insights about failed tasks. [Learn more about "Explain with AI" here.](/ci/troubleshooting/explain-with-ai)
#### Automatic Resource Allocation (Coming Soon)
This feature leverages custom AI/ML models to dynamically allocate resources based on your projects specific needs. It optimizes performance by efficiently assigning Nx Agents to achieve target durations for main and PR branches.
### Transform Your Workflow
By enabling AI features in Nx Cloud, youre setting your organization up for a more intelligent and efficient development workflow. Stay tuned for the release of these powerful AI driven tools and take your development process to the next level.

View File

Before

Width:  |  Height:  |  Size: 267 KiB

After

Width:  |  Height:  |  Size: 267 KiB

View File

Before

Width:  |  Height:  |  Size: 376 KiB

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

View File

@ -0,0 +1,48 @@
# Explain with AI (beta)
"Explain with AI" helps you understand complex errors more quickly by providing AI-powered error resolution steps. This is made possible by using additional context from Nx targets and metadata, allowing for more accurate and relevant responses.
![explain with ai](/nx-cloud/features/explain-with-ai.avif)
## Enable Explain with AI
To use the "Explain with AI" feature, you need to [enable AI features for your organization](/ci/concepts/nx-cloud-ai#enable-nx-cloud-ai-features). In the **settings** menu, locate the "AI Features" section and toggle it to "On".
![enable ai features](/nx-cloud/features/ai-features.png)
AI features are available only for the [Nx Cloud Pro plan](/pricing). If you are on the Hobby plan, you can start a free trial to test AI features in your workspace.
## Using Explain with AI
{% callout type="check" title="Authentication Required" %}
If you don't see the "Explain with AI" button, ensure you are logged into the application.
{% /callout %}
1. **Access the Task**:
- Navigate to the Nx Cloud dashboard and locate the task that failed.
- Click on the task to open the detailed view.
2. **Initiate AI Explanation**:
- In the task details, find the "Explain with AI" button.
- Click on this button to start the AI analysis.
![explain with ai button](/nx-cloud/features/explain-with-ai-1.png)
3. **Review the Explanation**:
- The AI will analyze the error log with additional context from the project task and provide a detailed explanation of the failure.
- It will also offer suggestions on how to resolve the issue.
![explain response](/nx-cloud/features/explain-with-ai-2.png)
4. **Implement the Suggestions**:
- Review the AI-generated suggestions carefully.
- Apply the recommended changes to your codebase.
5. **Verify the Fix**:
- After making the changes, rerun the task to see if the issue is resolved.
6. **Mark Answer as Not Helpful** (Optional):
- If the suggested changes did not help, click on "Set answer as not helpful." This helps us continuously improve the responses.

View File

@ -1,78 +0,0 @@
# Explain with AI (beta)
"Explain with AI" in Nx Cloud leverages artificial intelligence to provide detailed explanations and insights for failed task outputs.
This feature helps developers understand complex errors quickly and offers suggestions for improvements, making the debugging process more efficient.
With the power of Nx Cloud, all explanations will be provided with additional context from Nx targets and metadata. This ensures that the AI responses have the correct context related to your failed task. This means that if you're trying to debug failed Gradle tasks, the AI will know to help you specifically with Gradle.
## What You Need to Enable This Feature
To use the "Explain with AI" feature, you need to [enable AI features for your organization](/ci/features/nx-cloud-ai).
- For enterprise on-prem customers, this feature is not enabled by default. You need to explicitly [enable AI features through environment flags](#how-to-enable-ai-features-for-enterprise-onprem-installations).
- For public cloud users, the AI feature is enabled automatically, [except for those in the EU due to regional restrictions](#regional-availability).
- This feature is not available for hobby (free) plans on Nx Cloud.
## How to Use
{% callout type="check" title="Authentication Required" %}
If you don't see the "Explain with AI" button, make sure that you are logged into the application.
{% /callout %}
1. **Access the Task**:
- First, navigate to the Nx Cloud dashboard and locate the task that failed.
- Click on the task to open the detailed view.
2. **Initiate AI Explanation**:
- Within the task details, find the "Explain with AI" button.
- Click on this button to start the AI analysis.
![explain with ai button](/nx-cloud/troubleshooting/explain-with-ai-1.png)
3. **Review the Explanation**:
- The AI will analyze the error log with additional context from the project task and provide a detailed explanation of the failure.
- It will also offer suggestions on how to resolve the issue.
![explain response](/nx-cloud/troubleshooting/explain-with-ai-2.png)
4. **Implement the Suggestions**:
- Go through the AI-generated suggestions carefully.
- Apply the recommended changes to your codebase.
5. **Verify the Fix**:
- After making the changes, rerun the task to see if the issue is resolved.
6. **Mark answer as not helpful** (optional):
- If the suggested changes did not help you, click on "Set answer as not helpful". This allows us to continuously improve the responses.
## How to Enable AI Features for Enterprise On-Prem Installations
To enable AI features for enterprise on-prem installations, add the following configuration to your `helm-values.yaml` file:
```yaml
nxApi
deployment:
env:
- name: NX_CLOUD_AI_ENABLED
value: 'true'
frontend
deployment:
env:
- name: OPENAI_SECRET_KEY
valueFrom:
secretKeyRef:
name: open-ai-secrets
key: OPENAI_SECRET_KEY
- name: NX_CLOUD_AI_ENABLED
value: 'true'
```
Make sure your OpenAI secret key is correctly configured to provide the necessary credits for `gpt-3.5-turbo` and `gpt-4o`.
### Regional Availability
This feature is not available for the EU cluster in public cloud installations due to regional restrictions. However, on-prem customers in the EU can still use this feature by providing their own OpenAI secret key and enabling the required environment variables.

View File

@ -259,15 +259,16 @@
- [Run Only Tasks Affected by a PR](/ci/features/affected)
- [Use Remote Caching (Nx Replay)](/ci/features/remote-cache)
- [Distribute Task Execution (Nx Agents)](/ci/features/distribute-task-execution)
- [Nx Cloud AI](/ci/features/nx-cloud-ai)
- [Dynamically Allocate Agents](/ci/features/dynamic-agents)
- [Automatically Split E2E Tasks (Atomizer)](/ci/features/split-e2e-tasks)
- [Identify and Re-run Flaky Tasks](/ci/features/flaky-tasks)
- [Dynamically Allocate Agents](/ci/features/dynamic-agents)
- [Explain With AI](/ci/features/explain-with-ai)
- [Concepts](/ci/concepts)
- [The Building Blocks of Fast CI](/ci/concepts/building-blocks-fast-ci)
- [Reduce Wasted Time in CI](/ci/concepts/reduce-waste)
- [Parallelization and Distribution](/ci/concepts/parallelization-distribution)
- [Cache Security](/ci/concepts/cache-security)
- [Nx Cloud AI](/ci/concepts/nx-cloud-ai)
- [Recipes](/ci/recipes)
- [Set Up CI](/ci/recipes/set-up)
- [Setting up Azure Pipelines](/ci/recipes/set-up/monorepo-ci-azure)
@ -316,7 +317,6 @@
- [Release Notes](/ci/reference/release-notes)
- [Troubleshooting](/ci/troubleshooting)
- [CI Execution Failed](/ci/troubleshooting/ci-execution-failed)
- [Explain With AI](/ci/troubleshooting/explain-with-ai)
- Nx-api
- [angular](/nx-api/angular)

View File

@ -1125,6 +1125,11 @@ const blogPosts = {
'/blog/nx-cloud-3-0-faster-more-efficient-modernized',
};
const featurePagesUpdate = {
'/ci/troubleshooting/explain-with-ai': '/ci/features/explain-with-ai',
'/ci/features/ai-features': '/ci/concepts/ai-features',
};
/**
* Public export API
*/
@ -1156,4 +1161,5 @@ module.exports = {
troubleshootingOutOfRecipes,
blogPosts,
decisionsSection,
featurePagesUpdate,
};

View File

@ -14,7 +14,7 @@ const features = [
"Debug task errors on your CI pipeline directly in your pipeline's UI.",
icon: CodeBracketIcon,
isAvailable: true,
link: '/ci/troubleshooting/explain-with-ai#explain-with-ai-betautm_source=nx.app&utm_campaign=ai-section',
link: '/ci/features/explain-with-ai#explain-with-ai-betautm_source=nx.app&utm_campaign=ai-section',
},
{
name: 'Dynamic Nx Agent sizing',

View File

@ -518,7 +518,7 @@ export function AiSection(): JSX.Element {
</p>
<div className="mt-4 flex items-center">
<Link
href="/ci/features/nx-cloud-ai#?utm_source=homepage&utm_medium=website&utm_campaign=homepage_links&utm_content=cta_ci_for_monorepos"
href="/ci/concepts/nx-cloud-ai?utm_source=homepage&utm_medium=website&utm_campaign=homepage_links&utm_content=cta_ci_for_monorepos"
title="Add AI to your CI with Nx Cloud"
prefetch={false}
className="group font-semibold leading-6 text-slate-950 dark:text-white"

View File

@ -72,7 +72,7 @@ export function EnterprisePlan({
/>
<p>
<Link
href="/ci/troubleshooting/explain-with-ai"
href="/ci/features/explain-with-ai"
title="Learn more about Explain with AI"
prefetch={false}
className="font-medium text-slate-700 underline dark:text-slate-300"

View File

@ -101,7 +101,7 @@ export function ProPlan({
/>
<p>
<Link
href="/ci/troubleshooting/explain-with-ai"
href="/ci/features/explain-with-ai"
title="Learn more about Explain with AI"
prefetch={false}
className="font-medium text-slate-700 underline dark:text-slate-300"