Giter Club home page Giter Club logo

idinsight / aaq-core Goto Github PK

View Code? Open in Web Editor NEW
21.0 5.0 4.0 17.71 MB

No-code, easy-to-setup, reliable content manager and RAG plugin for chatbots in social sector

Home Page: https://ask-a-question.com

License: BSD 3-Clause "New" or "Revised" License

Dockerfile 0.64% Python 65.01% Mako 0.11% Shell 0.03% Makefile 0.96% CSS 1.09% TypeScript 32.14% JavaScript 0.01%
faq faq-chatbot faq-system fastapi guardrails llms mkdocs-material rag react

aaq-core's Introduction

logo logo

Developer Docs | Features | Usage | Architecture | Funders and Partners

Ask A Question is a free and open-source tool created to help non-profit organizations, governments in developing nations, and social sector organizations use Large Language Models for responding to citizen inquiries in their native languages.

๐Ÿคธโ€โ™€๏ธ Features

โ“ LLM-powered search

Match your questions to content in the database using embeddings from LLMs.

๐Ÿค– LLM responses

Craft a custom reponse to the question using LLM chat and the content in your database

๐Ÿ”Œ Integrate with your own chatbot

Connect to your own chatbot on platforms like Turn.io, Glific, and Typebot using our APIs.

๐Ÿ“š Manage content

Use the AAQ App to add, edit, and delete content in the database (Sign up for a demo here)

๐Ÿšจ Message Triaging

Identify urgent or important messages based on your own criteria.

๐Ÿง‘โ€๐Ÿ’ผ Content manager dashboard

See which content is the most sought after, the kinds of questions that receive poor feedback, identify missing content, and more

๐Ÿšง Upcoming

๐Ÿ’ฌ Conversation capability

Refine or clarify your question through conversation

๐Ÿ“น Multimedia content

Respond with not just text but voice, images, and videos as well.

๐Ÿง‘โ€๐Ÿ’ป Engineering dashboard

Monitor uptime, response rates, throughput HTTP reponse codes and more

Note

Looking for other features? Please raise an issue with [FEATURE REQUEST] before the title.

Usage

There are two major endpoints for Question-Answering:

  • Embeddings search: Finds the most similar content in the database using cosine similarity between embeddings.
  • LLM response: Crafts a custom response using LLM chat using the most similar content.

See docs or API docs for more details and other API endpoints.

โ“ Embeddings search

curl -X 'POST' \
  'https://[DOMAIN]/api/embeddings-search' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <BEARER TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
  "query_text": "how are you?",
  "query_metadata": {}
}'

๐Ÿค– LLM response

curl -X 'POST' \
  'https://[DOMAIN]/api/llm-response' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <BEARER TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
  "query_text": "this is my question",
  "query_metadata": {}
}'

๐Ÿ“š Manage content

You can access the admin console at

https://[DOMAIN]/

Architecture

We use docker-compose to orchestrate containers with a reverse proxy that manages all incoming traffic to the service. The database and LiteLLM proxy are only accessed by the core app.

Flow

Documentation

See here for full documentation.

Funders and Partners

google_dot_org

aaq-core's People

Contributors

sidravi1 avatar suzinyou avatar amiraliemami avatar lickem22 avatar ziakhan04 avatar dependabot[bot] avatar tanmay-97 avatar tonyzhao6 avatar yvonnegitau avatar mustafaakolawala avatar

Stargazers

 avatar Versha Yadav avatar Luv avatar  avatar Mike DuPont avatar Mark avatar Juan Luis Cano Rodrรญguez avatar  avatar Niall Keleher avatar Kristin Ho avatar Evgeny Postnov avatar Dominik Antal avatar  avatar  avatar  avatar Aman Khullar avatar Yuhong Sun avatar Apostolos Benisis avatar Christian Meyer avatar  avatar Ishaan Jaff avatar

Watchers

Griffin Muteti avatar  avatar  avatar  avatar Kristin Ho avatar

aaq-core's Issues

[DMP 2024]: Voice API

Ticket Contents

Description

[Provide a brief description of the feature, including why it is needed and what it will accomplish.]
Ask A Question is a free and open-source tool created to help non-profit organizations, governments in developing nations, and social sector organizations utilize Large Language Models for responding to citizen inquiries in their native languages.

Create new voice response API: the API will allow users to send questions and receive responses from AAQ using voice notes. This will increase the accessibility of AAQ to users for whom speaking/listening is easier than writing/reading.

Goals & Mid-Point Milestone

Goals

By mid-point

  • Develop an API endpoint in AAQ for sending queries in text and receiving responses in voice (text-to-speech, TTS). The first iteration may use an external TTS API
  • Develop a TTS service for AAQ using an open-source model that can replace an external TTS API

By project end

  • Develop an API endpoint for sending questions as voice notes and receiving responses as voice notes (speech-to-text, text-to-speech)
  • Integrate the TTS service into AAQ infrastructure on AWS
  • Publish a short blog post on AAQ website about the changes

For every goal listed, there will be a few rounds of design-feedback-implementation with support from the mentors and wider AAQ team.

Setup/Installation

AAQ contribution guide is here: https://idinsight.github.io/aaq-core/develop/contributing/

You will be given access to our testing environment on AWS.

Expected Outcome

  1. AAQ users can query the voice endpoints for voice questions and/or voice response. This can be seamlessly integrated into AAQโ€™s chat flow manager of choice, Typebot.io.
  2. AAQ users have an option to use an open-source TTS/STT model instead of an external API.

Acceptance Criteria

No response

Implementation Details

You will build the APIs in our core_backend component, which is built in Python, using FastAPI.

Our database is PostgreSQL + pgvector for managing document embeddings (contents) as well as other transactional data.

For the TTS/STT service that serves open-sourced models, you will make it as platform-agnostic as possible, which often means using Docker, but the integration will be to AWS, as our demo environment sits in AWS. You will be able to lead the architecture design for such a service. Of course, our mentors and the wider AAQ team will be available to support and think it through together.

Mockups/Wireframes

No response

Product Name

Ask A Question

Organisation Name

IDinsight

Domain

Open Source Library

Tech Skills Needed

AWS, Database, Python

Mentor(s)

@amiraliemami @lickem22 are Data Scientists at IDinsight!

Category

API, Backend, Database, Delpoyment, AI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.