diff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.yml new file mode 100644 index 0000000..2152574 --- /dev/null +++ b/.github/workflows/devskim.yml @@ -0,0 +1,34 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: DevSkim + +on: + push: + branches: [ "master", "dev" ] + pull_request: + branches: [ "master", "dev" ] + schedule: + - cron: '35 3 * * 2' + +jobs: + lint: + name: DevSkim + runs-on: ubuntu-20.04 + permissions: + actions: read + contents: read + security-events: write + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run DevSkim scanner + uses: microsoft/DevSkim-Action@v1 + + - name: Upload DevSkim scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: devskim-results.sarif diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml new file mode 100644 index 0000000..15719c7 --- /dev/null +++ b/.github/workflows/super-linter.yml @@ -0,0 +1,29 @@ +# This workflow executes several linters on changed files based on languages used in your code base whenever +# you push a code or open a pull request. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/github/super-linter +name: Lint Code Base + +on: + push: + branches: [ "master", "dev" ] + pull_request: + branches: [ "master", "dev" ] +jobs: + run-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + + - name: Lint Code Base + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: "master" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index a172e75..f00bf61 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,72 @@ -# atlas -👁‍🗨Hallucination detector for Large Language Models. +# ATLAS 🌐 + +Final year project by [Jesse Amarquaye](mailto:jesseamarquayelegendary@gmail.com "Send email") and Greatman Akomea, +computer engineering students from [Ghana Communication Technology University](https://www.gctu.edu.gh "GCTU"). + +## Table Of Contents + +- [Introduction](#introduction) + - [Why work on hallucination in LLMs?](#why-work-on-hallucination-in-llms) + - [Why Atlas?](#why-atlas) + - [Aims or Objectives](#aims-or-objectives) +- [Methodology](#methodology) + +## Introduction + +Atlas is a hallucination detector for Large Language Models. +Its main focus is on **generative text** as that is the most widely used medium for interacting with LLMs. + +### Why work on hallucination in LLMs? + +Large language models (LLMs) are revolutionizing human-computer interaction, generating increasingly _fluent_ and +_human-like text_. +However, a significant challenge in LLMs is their tendency to produce **hallucinations**, or factually incorrect, +nonsensical, or misleading content. +As humans become increasingly reliant on LLMs for information and decision-making, ensuring their reliability and +accuracy is crucial. +This project aims to address this challenge by developing a software for **detecting** and **mitigating** +hallucinations in LLMs so users can rely on LLM outputs with greater confidence, leading to wider adoption and +societal benefits and also reduces the risk of misinformation to promote responsible use of LLMs. + +### Why Atlas? + +The story of Atlas in Greek mythology is closely tied to his role in supporting the heavens. According to one myth, +during the _Titanomachy; the war between the Titans and the Olympian gods_, Atlas sided with the Titans. After their +defeat, Zeus condemned Atlas to bear the weight of the heavens on his shoulders for eternity. + +The name **Atlas** symbolizes the software's commitment to bearing the responsibility of overseeing the cognitive +aspects of language models, maintaining their stability, and preventing them from collapsing into inaccuracies or +hallucinations. The association with Atlas also conveys _strength_, _resilience_, and _reliability_, suggesting a +software that can handle the weight of complex language processing tasks with steadfastness and precision. + +### Aims or Objectives + +- [x] Explore techniques for mitigating hallucinations in LLMs. +- [ ] Develop a software for automatic detection of hallucinations in LLMs. +- [ ] Evaluate the effectiveness of the developed tool in different LLMs. + +## Methodology + +Our approach will be the design and implementation of a software to detect or flag and mitigate +hallucinations in LLMs. +The ultimate objective is the creation of a browser extension to actively scan the output from LLMs and +compare them with results from trusted sources on the web and inform the user of any occurrence of hallucinations. +An additional feature (probably in the future) will be to find the sources of the response the LLM generated. + +
+ + View Flow Diagram + +![Flow diagram](docs/img/flow.svg) + +
+ +### What we plan to do + +- [ ] Create a site to test how atlas will detect hallucinations in LLMs. +- [ ] Create browser extension to finally test how atlas will operate. + +### What we do not plan to do + +- ~~Detecting and mitigating hallucination in images generated by LLMs.~~ +- ~~Detecting and mitigating hallucination in videos generated by LLMs.~~ diff --git a/docs/img/flow.png b/docs/img/flow.png new file mode 100644 index 0000000..cba367c Binary files /dev/null and b/docs/img/flow.png differ diff --git a/docs/img/flow.svg b/docs/img/flow.svg new file mode 100644 index 0000000..fab05ff --- /dev/null +++ b/docs/img/flow.svg @@ -0,0 +1,2 @@ +
Start
Start
User queries LLM
User queries LLM
End
End
Atlas scans response and checks for signs of hallucination
Atlas scans resp...
Hallucination detection
Hallucination detect...
Propmt the user of possible hallucinations
Propmt the user of p...
Continue scanning response from LLM
Continue scanning re...
Crawl the web for the right response and present to the user
Crawl the web for th...

Flow Diagram

Flow Diagram +
Hallucination dectected
Hallucination dectected
No detection
No detection
Text is not SVG - cannot display
\ No newline at end of file