Spaces:
Sleeping
Sleeping
Commit
·
d1d0c5f
1
Parent(s):
14c4f39
chore: readme
Browse files
README.md
CHANGED
|
@@ -1 +1,72 @@
|
|
| 1 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Interview AI Detector
|
| 2 |
+
|
| 3 |
+
## Overview
|
| 4 |
+
|
| 5 |
+
Interview AI Detector is a machine learning model designed to distinguish between human and AI-generated responses during interviews. The system is composed of two models:
|
| 6 |
+
|
| 7 |
+
1. **ALBERT Model**: Processes text features extracted from responses.
|
| 8 |
+
2. **Logistic Regression Model (LogReg)**: Utilizes the output from the ALBERT model along with additional behavioral features to make the final prediction.
|
| 9 |
+
|
| 10 |
+
The model is deployed on Google Vertex AI, with integration managed by a Kafka consumer deployed on Google Compute Engine. Both the model and Kafka consumer utilize FastAPI for API management.
|
| 11 |
+
|
| 12 |
+
## Architecture
|
| 13 |
+
|
| 14 |
+
### ALBERT Model
|
| 15 |
+
|
| 16 |
+
- **Source**: HuggingFace
|
| 17 |
+
- **Input**: 25 numerical features extracted from the text, including:
|
| 18 |
+
- Part-of-Speech (POS) tags
|
| 19 |
+
- Readability scores
|
| 20 |
+
- Sentiment analysis
|
| 21 |
+
- Perplexity numbers
|
| 22 |
+
- **Output**: Features used as input for the Logistic Regression model
|
| 23 |
+
|
| 24 |
+
### Logistic Regression Model
|
| 25 |
+
|
| 26 |
+
- **Input**:
|
| 27 |
+
- Output from the ALBERT model
|
| 28 |
+
- 4 additional features, including typing behavior metrics such as backspace count and key presses per letter
|
| 29 |
+
- **Output**: Final prediction indicating whether the response is human or AI-generated
|
| 30 |
+
|
| 31 |
+
## Deployment
|
| 32 |
+
|
| 33 |
+
- **Model Deployment**: Vertex AI
|
| 34 |
+
- **Kafka Consumer Deployment**: Compute Engine
|
| 35 |
+
- **API Framework**: FastAPI
|
| 36 |
+
- **Training**:
|
| 37 |
+
- **Epochs**: 8
|
| 38 |
+
- **Dataset**: 2000 data points (1000 human responses, 1000 AI-generated responses)
|
| 39 |
+
- **Framework**: PyTorch
|
| 40 |
+
|
| 41 |
+
## Usage
|
| 42 |
+
|
| 43 |
+
### API Endpoints
|
| 44 |
+
|
| 45 |
+
- **POST /predict**:
|
| 46 |
+
- **Description**: Receives a pair of question and answer, along with typing behavior metrics. Runs the prediction pipeline and returns the result.
|
| 47 |
+
- **Input**:
|
| 48 |
+
```json
|
| 49 |
+
{
|
| 50 |
+
"question": "Your question text",
|
| 51 |
+
"answer": "The given answer",
|
| 52 |
+
"backspace_count": 5,
|
| 53 |
+
"letter_click_counts": {"a": 27, "b": 4, "c": 9, "d": 17, "e": 54, "f": 12, "g": 4, "h": 15, "i": 25, "j": 2, "k": 2, "l": 14, "m": 10, "n": 23, "o": 23, "p": 9, "q": 1, "r": 24, "s": 19, "t": 36, "u": 9, "v": 6, "w": 8, "x": 1, "y": 7, "z": 0}
|
| 54 |
+
}
|
| 55 |
+
```
|
| 56 |
+
- **Output**:
|
| 57 |
+
```json
|
| 58 |
+
{
|
| 59 |
+
"predicted_class": "HUMAN" or "AI",
|
| 60 |
+
"main_model_probability": "0.85",
|
| 61 |
+
"secondary_model_probability": "0.75",
|
| 62 |
+
"confidence": "High Confidence" or "Partially Confident" or "Low Confidence"
|
| 63 |
+
}
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Limitations
|
| 67 |
+
|
| 68 |
+
- The model is not designed for retraining. The current implementation focuses solely on deployment and prediction.
|
| 69 |
+
- The repository is meant for deployment purposes only and does not support local installation for development.
|
| 70 |
+
|
| 71 |
+
## Author
|
| 72 |
+
Yakobus Iryanto Prasethio
|