In situ interactive widgets for responsible AI π±
π Farsight Demo | πΊ Demo Video | π Research Paper |
Farsight is a collection of in situ interactive widgets that help large language model (LLM) prompt creators to envision potential harms associated with their AI applications. With a novel in situ design, contextual AI incident feed, and human-AI collaborative harm envisioning, Farsight empowers prompt creators with diverse backgrounds to be more mindful of responsible AI during early AI prototyping.
Widgets | ||
1οΈβ£ | Alert Symbol | Alert users with potential risks of their prompts and AI applications |
2οΈβ£ | Incident Panel | Relevant cautionary tales for users' AI applications |
3οΈβ£ | Use Case Panel | LLM-generated diverse use cases, stakeholders, and harms |
4οΈβ£ | Harm Envisioner | Human-AI collaborative harm envisioning tool |
Distributions | ||
π¦ | Live Demo | Try Farsight with Gemini Pro and GPT-3.5 |
π¦ | Chrome Extension | Google AI Studio support |
π¦ | Python Package | Computational notebook support (Jupyter, Colab, VS Code notebook) |
Click to see the demo video!
farsight-demo-video.mp4
For a live demo, visit: https://PAIR-code.github.io/farsight/.
If you use computational notebooks (e.g., Jupyter Notebook, JupyterLab, Google Colab, VS Code Notebook), you can easily use Farsight via its Python Package. We recommend using StickyLand to enable sticky cells.
Visit this Colab Notebook for a demo.
# Install Farsight
!pip install farsight
prompt = "Translate a sentence from English to French."
# Alert Symbol
farsight.symbol(prompt)
# Awareness Sidebar
farsight.sidebar(prompt)
# Harm Envisioner
farsight.envision(prompt)
If you use Google AI Studio to prototype AI applications, you can manually install our Chrome Extension package from the latest release.
- Download
farsight.crx
- Open
chrome://extensions/
in Chrome - Drag
farsight.crx
into the page - Visit Google AI Studio and you will see Farsight :)
If you are a developer of web-based prompting tools, you can easily integrate different Farsight widgets into your tool regardless of your development stacks (e.g., React, Svelte, or Vanilla JS).
First, install Farsight's JavaScript package:
npm install --save-dev @xiaohk/farsight
Then, you can use Farsight as Web Components.
JavaScript:
import '@xiaohk/farsight';
import {
FarsightContainer,
FarsightContainerLite,
FarsightContainerSignal
} from '@xiaohk/farsight';
HTML:
<farsight-container-signal
prompt="Translate a sentence from English to French"
></farsight-container-signal>
Clone or download this repository:
git clone git@github.com:PAIR-code/farsight.git
Install the dependencies:
npm install
Then run Farsight:
npm run dev
Navigate to localhost:3000. You should see Farsight running in your browser :)
Farsight is a collection of Web Components that developers can easily integrate into their web apps regardless of their development stack (e.g., Angular, React, Svelte). Farsight is written in TypeScript using LIT Element as a framework. Farsight uses D3.js to implement the interactive tree visualization. The relevant AI incidents are from the AI Incident Database, and the harm category is from the sociotechnical harm taxonomy. The computational notebook support is enabled by NOVA.
Led by Jay Wang, Farsight is a result of a collaboration between researchers from Google Research, Georgia Tech, eBay, and Emory University. Farsight is created by Jay Wang, Chinmay Kulkarni, Lauren Wilcox, Mike Terry, and Michael Madaio.
To learn more about Farsight, please read our research paper (published at CHI 2024).
@inproceedings{wangFarsightFosteringResponsible2024,
title = {Farsight: {{Fostering Responsible AI Awareness During AI Application Prototyping}}},
booktitle = {{{CHI Conference}} on {{Human Factors}} in {{Computing Systems}}},
author = {Wang, Zijie J. and Kulkarni, Chinmay and Wilcox, Lauren and Terry, Michael and Madaio, Michael},
year = {2024}
}
- The software is available under the Apache License 2.0.
- The random prompts in
public/data/random-prompts.json
are from Awesome ChatGPT Prompts with a CC0 license.
If you have any questions, feel free to open an issue or contact Jay Wang.