I provide four supported ways to feed customer queries into the SupportPipeline: an interactive web dashboard, a terminal CLI, a REST API, and a Python SDK. This gives developers and operators the flexibility to choose the most convenient interface for their workflow.
- Supported input methods = 4
Dataset size used for training ≈3 M tweets
Minimum text length filter = > 35 characters for both inbound and outbound tweets
Run `./run.sh` and open **`http://localhost:8000`**.
python -m src.cli --query "My iPhone battery is swollen and warm to touch"
python -m src.cli --interactive
curl -X POST http://localhost:8000/api/process \
-H "Content-Type: application/json" \
-d '{
"text": "My iPhone battery dies within 2 hours after updating to iOS 11",
"author_id": "customer_123"
}'
from src.models import TweetInput
from src.pipeline import SupportPipeline
pipeline = SupportPipeline()
tweet = TweetInput(
tweet_id="tw_001",
text="How do I turn on AirDrop on my iPhone?",
author_id="user_alex",
)
response = pipeline.process(tweet)
print("Intent:", response.intent.primary_intent.value)
print("Action:", response.triage.action.value)
print("Drafted Reply:", response.drafted_reply)
The ingestion script src/data/ingest_kaggle.py streams the Kaggle twcs.csv file through a DuckDB query that joins inbound and outbound tweets, filters for AppleSupport replies, keeps only original conversation starters (in_response_to_tweet_id IS NULL), and enforces the > 35‑character rule. hiver-assignment provides the broader context of the project.
SELECT
inbound.tweet_id AS inbound_tweet_id,
outbound.tweet_id AS outbound_tweet_id,
inbound.text AS customer_text,
outbound.text AS agent_reply
FROM 'data/twcs.csv' AS inbound
JOIN 'data/twcs.csv' AS outbound
ON inbound.tweet_id = outbound.in_response_to_tweet_id
WHERE outbound.author_id = 'AppleSupport'
AND inbound.inbound = true
AND inbound.in_response_to_tweet_id IS NULL -- Isolates pure conversation initiators
AND length(inbound.text) > 35
AND length(outbound.text) > 35

