Skip to content
Open
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
Binary file not shown.
143 changes: 48 additions & 95 deletions packages/documentation-site/patternfly-docs/content/AI/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,27 @@ sortValue: 1
---
import { Alert, AlertActionLink, Accordion, AccordionItem, AccordionContent, AccordionToggle, Button, Card, CardHeader, CardTitle, CardBody, CardFooter, Checkbox, Divider, DescriptionList, DescriptionListTerm, DescriptionListGroup, DescriptionListDescription, Grid, GridItem} from '@patternfly/react-core';
import ExternalLinkSquareAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-square-alt-icon';
import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';

When used thoughtfully, **AI** can enhance user experiences through personalized interactions, increased efficiency, and innovative designs.
When used thoughtfully, **AI** can enhance user experiences through personalized interactions, increased efficiency, and innovative designs. Regardless of the AI resources or workflows you use, it's important to ensure that you're aligned with the compliance rules, ethical considerations, and best practices on this page.

To support your AI practices, we provide a range of AI tools that you can integrate into your workflows, plus guidance for using AI with PatternFly:
## PatternFly AI resources

- **[Rapid prototyping](/ai/rapid-prototyping):** How to quickly test and iterate on AI features during the early stages of design.
- **[AI-assisted code migration](/ai/ai-assisted-code-migration):** How to quickly test and iterate on AI features during the early stages of design.
- **[Conversational Design Principles](/ai/conversation-design):** Guidance for designing effective and human-centered text-based conversational flows.
- **[Rapid Prototyping Guidelines](/ai/generative-uis/overview):** How to quickly test and iterate on AI features during the early stages of design.
The following guides are intended to help you integrate AI into your workflows as you design and develop products with:

Regardless of the AI resources or workflow you're using, it's important to ensure that you're aligned with the compliance rules, ethical considerations, and best practies on this page.
- **[Design language](/ai/design-language):** The foundational design decisions that guide the use of AI features in products.
- **[Rapid prototyping](/ai/rapid-prototyping):** Guidance for generating and iterating AI features during early stages of design.
- **[AI-assisted code migration](/ai/ai-assisted-code-migration):** Guidance for using AI to speed up and simplify codebase migrations.
- **[Conversational design principles](/ai/conversation-design):** Guidance for designing effective and human-centered AI conversations.
- **[Generative UIs](/ai/generative-uis/overview):** Proof-of-concept resources for creating UIs that can utilize AI to dynamically generate elements as needed.

---

## How do I ensure compliance?
## What rules and best practices do I need to follow?

There are important compliance rules and ethical considerations that must guide your use of AI with PatternFly.
All AI systems built with PatternFly must adhere to Red Hat's legal and ethical framework.

### Red hat policies
### Red Hat policies

When using PatternFly to design Red Hat products, you *must* adhere to AI-related policies that Red Hat has previously outlined. This means you must:
- Gain approval before using AI technology for business related to Red Hat.
Expand All @@ -36,9 +38,9 @@ When using PatternFly to design Red Hat products, you *must* adhere to AI-relate
View policy details (requires Red Hat login)
</Button>

## How do I ensure ethical practice?
### PatternFly AI principles

There are 5 core principles of PatternFly AI: accountability, explainability, transparency, fairness, and human-centeredness. These principles create an ethics-first framework for AI use, and any AI system built with PatternFly should adhere to all **five principles**.
These five core principles create our ethics-first framework, which should guide the use of AI related to PatternFly.

<Grid hasGutter>
<GridItem span={6}>
Expand All @@ -47,7 +49,7 @@ There are 5 core principles of PatternFly AI: accountability, explainability, tr
<CardTitle>Accountability</CardTitle>
</CardHeader>
<CardBody>
All people involved in any step of creating AI are **accountable** for considering its impact. There should be clearly defined roles for design, development, and deployment. Decisions and processes should be well-documented.
All people involved in any step of creating AI are **accountable** for considering its impact. Roles and processes are clearly defined and documented.
</CardBody>
</Card>
</GridItem>
Expand Down Expand Up @@ -93,103 +95,54 @@ There are 5 core principles of PatternFly AI: accountability, explainability, tr
</GridItem>
</Grid>

### Ethical design checklist
## How do I design AI features with best practices in mind?

When working on an AI system, you should consciously check that you're in alignment with the core principles of PatternFly AI. While this is an area that will continue to evolve with the rest of the industry, the following checklists outline some of the key areas that you should consider for each principle.

#### Accountability

| <div style="width:10rem">Key area</div> | Rule | <div style="width:10rem">Status</div>|
| --- | --- | --- |
| Policies | Company AI policies are readily accessible to all team members. | <Checkbox id="accountability-policies" label="Compliant"></Checkbox>
| Legal compliance | All necessary laws, regulations, and ethical guidelines are followed throughout the development process. AI does not enable illegal, unethical, or contract-breaking activities. | <Checkbox id="accountability-legal" label="Compliant"></Checkbox>
| Practices | AI does not answer unsafe questions or access unsecure data. | <Checkbox id="accountability-practices" label="Compliant"></Checkbox>

#### Explainability

| <div style="width:10rem">Key area</div> | Rule | <div style="width:10rem">Status</div>|
| --- | --- | --- |
| Outcomes | There are clear explanations available that describe how AI conclusions are reached. | <Checkbox id="explainability-outcomes" label="Compliant"></Checkbox>
| Citations | Any related citations are provided to users. | <Checkbox id="explainability-citations" label="Compliant"></Checkbox>|
| Context | To support troubleshooting, AI gives context to Red Hatters who review its interactions. |<Checkbox id="explainability-context" label="Compliant"></Checkbox> |

#### Transparency

| <div style="width:10rem">Key area</div> | Rule | <div style="width:10rem">Status</div>|
| --- | --- | --- |
| Documentation | Design processes and decisions are well documented.| <Checkbox id="transparency-documentation" label="Compliant"></Checkbox>
| Data usage | Informed consent is obtained to collect and use data. The ways that user data is collected, stored, and used are openly shared. AI is clear about the data that it records. | <Checkbox id="transparency-data-usage" label="Compliant"></Checkbox>
| Confidence | AI shares when it has low confidence in its response. |<Checkbox id="transparency-confidence" label="Compliant"></Checkbox>
| Limitations | AI shares when it believes that it can’t fulfill a request. | <Checkbox id="transparency-limitations" label="Compliant"></Checkbox>

#### Fairness

| <div style="width:10rem">Key area</div> | Rule | <div style="width:10rem">Status</div>|
| --- | --- | --- |
| Bias | Potential biases are identified, reduced, and actively studied. | <Checkbox id="fairness-bias" label="Compliant"></Checkbox>
| Inclusion | Designs are inclusive and accommodating of various user demographics. | <Checkbox id="fairness-inclusion" label="Compliant"></Checkbox>
| Equal access | Access to AI technologies is available and beneficial to as many users and communities as possible. | <Checkbox id="fairness-equal-access" label="Compliant"></Checkbox>

#### Human-centeredness

| <div style="width:10rem">Key area</div> | Rule | <div style="width:10rem">Status</div>|
| --- | --- | --- |
| Value and need | AI is aligned with user needs and values and will be continuously refined based on user feedback and ethical considerations. | <Checkbox id="human-centered-value" label="Compliant"></Checkbox>
| Communication | AI has a predictable tone and voice. It can handle emotional responses from users gracefully. | <Checkbox id="human-centered-communication" label="Compliant"></Checkbox>
| Cultural sensitivity | Cultural differences are considered and respected. | <Checkbox id="human-centered-cultural" label="Compliant"></Checkbox>
| Data rights and control | Users have control over their data, including the ability to access, modify, and delete their information. AI does not act on behalf of users without explicit permission and clear opportunities for permission withdrawal. | <Checkbox id="human-centered-data-rights" label="Compliant"></Checkbox>
| Optional | There is an obvious and simple way for users to opt out of using AI. | <Checkbox id="human-centered-optional" label="Compliant"></Checkbox>
| Privacy | Personally identifiable information is protected and used responsibly. | <Checkbox id="human-centered-privacy" label="Compliant"></Checkbox>
When designing, developing, and using AI, consider the following ethical and best-practice guidelines.

## How do I apply AI design best practices?
### Document your value proposition

When designing, developing, and using AI, consider the following ethical and best-practice guidelines.
Every AI product should begin with a documented user need and problem statement. Before choosing a technology, identify the specific gap in the current experience that AI is uniquely qualified to fill.

### Determine if AI adds value

Not all uses of AI are good for your UX strategy. As much as possible, conduct research to identify real user needs that AI features could help solve
Not all uses of AI are good for your UX strategy. Conduct research to identify real user needs where AI provides a clear advantage over traditional UI patterns.

Some of the more common problems that AI *might* be able to help solve include:
- Increasing users' productivity and efficiency.
- Personalizing user experience to make engagements more personal and relevant.
- Making design processes more sustainable.
**Do not** add AI features simply because they are new or trendy. If the value proposition isn't documented and validated by research, stick to standard UI.

#### When to use AI
Depending on your users' needs, value-adding features could include:
- AI-driven search, to tailor search results to a user's unique needs.
- AI that helps streamline onboarding, data entry, or routine job tasks.
- AI that makes product recommendations based on a user's history.

#### When not to use AI
- Do not add AI features simply because they are new, trendy, or fun. They need to matter to the user.
- **Improve productivity:** Streamlining onboarding, data entry, or routine job tasks.
- **Offer better personalization:** Tailoring search results or dashboard views to a user's unique history.
- **Support sustainability:** Making design and development processes more repeatable.

### Enhance—don't replace—human abilities
#### Choosing the right AI technology
Some AI features are better suited for different types of AI, and they should align with the user's risk tolerance.

AI is best when it enhances human abilities, not when it's used to replace humans. It cannot exist in a silo—humans help bring the value of AI to life.
| AI feature type | Usage | Risk tolerance |
| :--- | :--- | :--- |
| **Generative AI** | Summarization, creative brainstorming, and conversational support. | **Lower:** Best when a "human-in-the-loop" can verify and edit the output. |
| **Predictive or structured AI** | Data classification, trend forecasting, and risk scoring. | **Higher:** Best for tasks requiring high precision and repeatable, data-driven outcomes. |

To ensure that the design of AI systems is human-centered, follow these practices:
## Ethical design and compliance checklist

- Nurture collaboration and cross-team alignment.
- Welcome multiple perspectives to encourage creativity and help mitigate bias.
- Check AI output for accuracy and identify areas where meaning is lost, language isn't inclusive, or information isn't true. Ask peers to review your AI-generated deliverables to help fact-check and catch mistakes.
When working on an AI system, you should consciously check that you're in alignment with the core principles and best practices of PatternFly and Red Hat.

### Be transparent with your users
To help teams navigate best practices and requirements, we offer a guiding checklist that covers accountability, transparency, and fairness standards. Note that this resource is open to change and is not exhaustive. Always ensure you're following the most up-to-date industry standards and Red Hat AI requirements.

As one of our core pillars, transparency is essential for ethical design with AI.

To help people understand and trust AI features:

- Tell users when AI is being used.
- Make its capabilities and limitations clear to set appropriate expectations.
- Explain how AI makes decisions.
- Keep users in control and let them decide how they interact with AI.
- Be clear and honest when AI fails or hallucinates.

### Be prepared for something to go wrong
<Button
variant="secondary"
icon={<DownloadIcon />}
component="a"
href="https://raw.githubusercontent.com/patternfly/patternfly-org/main/packages/documentation-site/patternfly-docs/content/AI/Red-Hat-AI-Ethics-Compliance-Checklist.pdf"
target="_blank"
rel="noopener noreferrer"
>
Download Ethics and Compliance Checklist (PDF)
</Button>

Errors and failure are inevitable when working with AI, so it is essential that you are prepared to handle undesired outcomes. You should understand the risk involved in AI and the impact that an error may have.
### Core guidelines for AI

To create a plan for issues, start by following these guidelines:
While the checklist handles the details, keep these three non-negotiables in mind:

- When AI fails, be explicit about errors and let users regain control as they want.
- Provide easy access to human support.
- **Imperceptible AI is not ethical:** Users must always be able to recognize when they are interacting with an AI system.
- **Communicate uncertainty:** If a model has low confidence in a result, the UI must reflect that uncertainty to the user.
- **Human-in-the-loop:** AI should augment human expertise. Always have a human review AI-generated output for accuracy and tone before it is finalized.
Loading
Loading