Changelog¶
All notable changes to PsychScanner are documented here.
0.2.0 (2025)¶
New features¶
-
FeedbackBaseAPI — subclassFeedbackBaseand implementon_response(trial, response)to inject trial-level feedback into the conversation. Replaces the legacygenerate_feedbackinterface.on_responsereceives the raw trial dict and a pre-parsed response dict; return a JSON string to inject orNoneto skip. -
Session checkpointing —
SessionTunnelwritesBEGIN,SCAN, andENDlog entries to a JSON file alongside experiment data. Settunnel_status="1"onExpCardInitto enable. Re-running the same script after an interruption resumes from the last completed participant. -
save_expcard/load_expcard— serialize and reload a complete experiment configuration, including inline task JSON and persona JSON, to a portable file. Designed for reproducibility and sharing across machines. -
get_task_template()— returns an empty task JSON skeleton for quick scaffolding. -
Mock LLM provider — use
model="mock-chat-model"andfamily="mock-llm"for zero-API-key testing of pipelines. -
parser_rawflag — setparser_raw=Trueto store the rawAIMessagealongside the parsed response dict intrial["pred_resp"]["_raw"]. -
summary_kcontext compression — when context overflows inConvomode, automatically summarize the oldestsummary_kmessages into a single summary message. -
Per-trial parser dispatch — pass a callable to
parserthat takes atrcodestring and returns the appropriate parser class. Enables multi-phase tasks with different output schemas per phase.
Provider support additions¶
- Google / Gemini (
google,gemini,google-genaifamily aliases) - Together.ai (
together) - Fireworks.ai (
fireworks) - Cohere (
cohere) - Azure OpenAI (
azure)
Documentation¶
- New MkDocs Material documentation site at
https://saurabhr.github.io/psychscanner/ - Full configuration reference, API reference, and user guides
- Example notebooks updated to use current API
Breaking changes¶
FeedbackBase.generate_feedback(trdata, pred_dict, input_dict, parser_status, trial_item_collector)is removed. Replace withon_response(trial, response).memory_typeis not a valid field; usememorywith values"SingleTurn"or"Convo".system_prompt,task_prompt, andresponse_formatare not fields onExpCardInit. Task content is set viatask_file; personas viapersona_files.
0.1.0 (2024)¶
Initial release¶
ExpCardInit/ExpCard— experiment configuration via Pydantic modelScannerModel— runs experiment trials against LangChain chat modelsSingleTurnandConvomemory modes- Bundled parsers:
DefaultLiteralAgree,DefaultLiteralVivid15,DefaultLiteralVivid010,DefaultResponseRating,Response_part_1_rm,Response_part_2_rm - Built-in VVIQ-16 imagery questionnaire as the default task
to_csv/concat_csvexport utilities- Support for OpenAI, Anthropic, Groq, Mistral, HuggingFace, and Ollama providers