Skip to content

ASUCICREPO/AskUSDA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AskUSDA - USDA Chatbot

AskUSDA is an intelligent AI-powered chatbot that helps the public, farmers, and ranchers quickly find accurate information from USDA programs and services. It uses AWS Bedrock Knowledge Bases, a serverless backend, and a modern Next.js frontend with a hover-over chatbot experience.


Visual Demo

User Interface Demo

Please provide a GIF or screenshot of the application interface and save it as docs/media/user-interface.gif.


Table of Contents

Description Link
Overview Overview
Architecture Architecture Diagram
Detailed Architecture Architecture Deep Dive
Deployment Deployment Guide
User Guide User Guide
API Documentation API Documentation
Modification Guide Modification Guide
Credits Credits
License License

Overview

AskUSDA is an AI-powered chatbot that helps the public, farmers, and ranchers quickly find accurate information from USDA programs and services. It enables natural-language conversations over USDA.gov content, with a hover-over chatbot on the main site and an admin dashboard for monitoring user feedback and escalations.

Key Features

  • AI-Powered Conversations using AWS Bedrock with Nova Pro
  • Knowledge Base Integration with USDA.gov and farmers.gov content (web pages and PDFs) via OpenSearch Serverless
  • Real-time Streaming Responses over WebSockets for a natural chat experience
  • Citation Support with source references for transparency
  • Thumbs Up/Down Feedback stored per message for analytics
  • Admin Dashboard for metrics, conversation feedback, and escalation requests
  • Escalation Requests with view/delete and full conversation preview
  • Hover-over Chatbot and responsive design for desktop and mobile

Architecture Diagram

Architecture Diagram

The application implements a serverless architecture on AWS, combining:

  • Frontend: Next.js application hosted on AWS Amplify (main page with hover chatbot, /admin dashboard)
  • Backend: AWS CDK–deployed WebSocket API + HTTP Admin API with Lambda handlers
  • AI Layer: AWS Bedrock Knowledge Base and Nova Pro, with guardrails for filtering out harmful content and block denied topics
  • Data Storage: DynamoDB for conversation logs, feedback, and escalation requests

For a detailed explanation of the architecture, see the Architecture Deep Dive.


Deployment Guide

For complete deployment instructions, see the Deployment Guide.


User Guide

For detailed usage instructions with screenshots, see the User Guide.


API Documentation

For complete API reference, see the API Documentation.


Modification Guide

For developers looking to extend or modify this project, see the Modification Guide.


Directories

├── backend/
│   ├── bin/
│   │   └── backend.ts
│   ├── lambda/
│   │   ├── websocket-handler/
│   │   │   └── index.js           # WebSocket chat, feedback, escalation Lambda
│   │   └── admin-api/
│   │       └── index.js           # Admin HTTP API Lambda (metrics, feedback, escalations)
│   ├── lib/
│   │   └── backend-stack.ts
│   ├── cdk.json
│   ├── package.json
│   └── tsconfig.json
├── frontend/
│   ├── app/
│   │   ├── layout.tsx
│   │   ├── page.tsx               # Main page with background and hover chatbot
│   │   ├── admin/page.tsx         # Admin dashboard for metrics, feedback, escalations
│   │   ├── components/ChatBot.tsx # Hover-over chatbot UI and WebSocket client
│   │   └── globals.css
│   ├── public/
│   │   ├── usda-bg.png            # USDA website background image
│   │   └── usda-symbol.svg        # USDA logo used in UI
│   └── package.json
├── docs/
│   ├── architectureDeepDive.md
│   ├── deploymentGuide.md
│   ├── userGuide.md
│   ├── APIDoc.md
│   ├── modificationGuide.md
│   └── media/
│       ├── architecture.png
│       └── user-interface.gif
├── LICENSE
└── README.md

Directory Explanations:

  1. backend/ - Contains all backend infrastructure and serverless functions

    • bin/ - CDK app entry point
    • lambda/ - Lambda source: websocket-handler (chat, feedback, escalation) and admin-api (metrics, feedback, escalations)
    • lib/ - CDK stack definitions
  2. frontend/ - Next.js frontend application

    • app/ - Next.js App Router pages and layouts
    • public/ - Static assets
  3. docs/ - Project documentation

    • media/ - Images, diagrams, and GIFs for documentation

Credits

This application was developed by:

Associate Cloud Developers:

UI/UX Designer:

Built in collaboration with the ASU Cloud Innovation Center.


License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •