Skip to content

yuna17c/contextual-autocomplete

Repository files navigation

Overview

This is a research project exploring how different tones of AI suggestions impact human writing. The project specifically examines the effects of positive and negative politeness strategies on user acceptance of AI-generated suggestions and their influence on their writing style. This repository contains the backend for the interface of the research project, including the pre- and post-research survey questionnaire, and the implementation of text auto completions.

Contents

Features

Interactive Writing Tool: Users interact with an AI-powered text editor that provides writing suggestions in varying tones. The suggestions are generated after users type space and wait with no other action for 1.5 seconds. GPT4o API is used to generate suggestions.
Replay Function: Each user submission is recorded and can be replayed at the URL /replays/[session-id].
Survey Integration: Before and after the writing task, users complete a survey to provide more background on themselves.
Data Analysis: The repository includes scripts and notebooks for analyzing the collected data, focusing on how users responded to different politeness strategies.

Project Structure

ai-writing/: Contains the code for the interactive writing tool.
notebook/: Includes scripts for various AI prompting experiments.
analysis/: Includes scripts and Jupyter notebooks for analyzing the data.

How to Run

  1. Install dependencies
    Inside the ai-writing directory, install all necessary dependencies by running pip install -r requirements.txt
  2. Add API key
    Create a file /ai-writing/.env and add a variable OPENAI_API_KEY.
  3. Run the server on your local machine
    Run the following command in the ai-writing directory.
    npm run dev

App is deployed here: https://ai-writing-45138-5a0c8.web.app/.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published