Skip to main content

Survey response classification powered by LLMs

Project description

cat-survey

Survey response classification powered by LLMs. A thin, survey-specific wrapper around cat-stack.

cat-survey adds survey-specific prompt framing ("A respondent was asked: ...") on top of the domain-agnostic cat-stack engine — giving LLMs the context that responses come from a survey instrument.

Installation

pip install cat-survey

With optional extras:

pip install "cat-survey[pdf]"         # PDF survey processing
pip install "cat-survey[embeddings]"  # Embedding-based similarity scoring

Quick Start

Classify survey responses

import catsurvey

results = catsurvey.classify(
    input_data=["I feel great about the program", "It was a waste of time"],
    categories=["Positive", "Negative", "Neutral"],
    survey_question="How do you feel about the new wellness program?",
    api_key="sk-...",
)

Discover categories from open-ended responses

result = catsurvey.extract(
    input_data=responses,
    api_key="sk-...",
    survey_question="What changes would you suggest for the workplace?",
)
print(result["top_categories"])

Summarize responses

summaries = catsurvey.summarize(
    input_data=responses,
    api_key="sk-...",
    description="Open-ended feedback from employee satisfaction survey",
)

How It Works

cat-survey is a thin wrapper that:

  1. Takes your survey_question parameter
  2. Injects survey-specific framing: "A respondent was asked: '{survey_question}'."
  3. Delegates to cat-stack for all LLM communication, classification logic, batch processing, and ensemble methods

All cat-stack parameters (multi-model ensemble, batch mode, chain-of-thought, etc.) are passed through via **kwargs.

API

Function Description
classify() Classify responses into predefined categories
extract() Discover and normalize categories from responses
explore() Raw category extraction (no deduplication)
summarize() Summarize responses (pass-through to cat-stack)

Ecosystem

Package Role
cat-stack Domain-agnostic LLM classification engine
cat-survey Survey-specific wrapper (this package)
cat-cog Cognitive assessment scoring (CERAD)

License

GPL-3.0-or-later

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cat_survey-0.2.1.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cat_survey-0.2.1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file cat_survey-0.2.1.tar.gz.

File metadata

  • Download URL: cat_survey-0.2.1.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.14

File hashes

Hashes for cat_survey-0.2.1.tar.gz
Algorithm Hash digest
SHA256 720dfc8e7ae7b7b68bd9229efd64c0202ad16aa6b3716b8beaf94dbb2efaf625
MD5 fe32fa58ddbb45d36442a9a58c4a08de
BLAKE2b-256 891a461e0b9d396385f02e3fc54eab03d560c6f659b94e78212416bfe3dce6c1

See more details on using hashes here.

File details

Details for the file cat_survey-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: cat_survey-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.14

File hashes

Hashes for cat_survey-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ed9f07def3e88a3721bae33711a86cadcb638892f69ea35f75d3b3229e8aee0
MD5 20783202e9da86eadc05b12bc2059ce1
BLAKE2b-256 21e09c134cfa0acc92667289c94891e5c8a0dd462a73a45458e39ff9bd8e854a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page