Controlled Psycholinguistic Experiments with Large Language Models


[Up] [Top]

Documentation for package ‘PsyLingLLM’ version 0.4.0

Help Pages

adaptive_feedback_experiment Run an Adaptive Feedback Experiment
build_body_pass2_structural Build Pass-2 body
build_registry_entry_from_analysis Build a registry entry from analysis results
build_standardized_input Build standardized Pass-2 headers & body from Pass-1 raw inputs
cat_slowly Print lines gradually with delay (console-safe)
classify_generation_interface Classify LLM generation interface from URL (robust and version-agnostic)
common_error_blacklist Common provider error-field blacklist (path segments only)
compare_path_line Compare two optional scalar strings (paths). Return a structured line and a boolean flag.
complete_headers_for_pass2 Complete headers minimally for Pass-2 (keeps user values)
conversation_experiment Run a Multi-turn Conversation Experiment
conversation_experiment_with_feedback Run an Adaptive Feedback Experiment
default_keyword_lexicon Default keyword lexicon for ns/st scoring
default_optional_keys Default optional keys for common LLM providers (explicit removal first)
detect_embedded_think_tag Detect embedded <think> tags in model output
ensure_registry_header Ensure registry directory exists and header is present
explain_alias Explain how an alias was derived from a model id
extract_pass2_templates Tolerant extraction of Pass-2 templates (headers and body)
extract_process_metrics Extract Standard Process Metrics from RAW Trial Results
extract_token_probabilities Extract Token Probabilities from RAW Trial Results
extract_usage_fields Extract usage field names from a parsed non-streaming response
factorial_trial_experiment Run Factorial Trial Experiment (registry-driven, assistant-native)
find_placeholder_path Recursively find the first path to a placeholder string
flatten_json_paths Flatten a JSON-like object into (path, key, value) rows
format_registration_preview Render a registry entry preview (verbatim from the registry node)
generate_llm_experiment_list Generate LLM Experiment List (CSV→XLSX conversion, UTF-8 safe)
generate_llm_factorial_experiment_list Generate LLM Experiment List for Factorial Design (UTF-8 safe)
get_model_config Resolve a model name (id or alias) to a registry entry (new registry-aware)
get_registry_entry Retrieve a registry interface entry (inputs / outputs / streaming)
get_registry_path Get user registry path (cross-platform, unified)
get_trial_raw Inspect One Archived RAW Trial Record
has_nonempty_text Does a value contain any non-empty textual content?
infer_role_mapping_from_body Infer role mapping from a chat-style LLM request body
infer_structure_from_placeholder Infer structure from where '"\${CONTENT}"' lives
inject_optional_params Inject optional params into a body using a whitelist
is_invalid_candidate Hard filter: blacklist, nullish, booleans, numeric-only, too-short Segment-exact blacklist (compares path segments, not substrings).
is_key Utility: check if a path segment is a named key
is_message_object Check if an object is a message object
list_get_by_path Get a nested value by a mixed path (character keys and integer indices)
llm_caller Call an LLM via the registry
llm_register Register an LLM Endpoint with Pass-2 Validation
load_registry Load the system LLM registry
make_alias Generate a compact alias for a model id
make_pass2_probe_inputs Build Pass-2 EFFECTIVE probe inputs (no forced system; structural role inference)
merge_defaults_for_probe Merge default generation parameters into a request body (probe only)
multi_model_experiment Run Trials Across Multiple Models (registry-driven, assistant-native)
normalize_history_messages Normalize conversation history into message objects
normalize_path_key_with_regex Normalize any path spec to a flat key AND, if needed, a regex with wildcard index
normalize_provider_label Normalize a free-form provider label
normalize_type_label Normalize a free-form type string (strip a leading '@' if present)
probe_llm_streaming Probe an LLM endpoint (non-stream + streaming, SSE-aware)
PsyLingLLM_Schema PsyLingLLM Schema (v1)
register_endpoint_offline Register an LLM endpoint offline (supports reasoning / thinking path)
register_endpoint_to_user_registry Upsert endpoint entry into the user registry (safe merge)
render_pass2_path_consistency_report Render a structured "[Pass-2 Verified Ports]" report section.
save_experiment_results Save Experiment Results to File
score_candidates_ns Rank non-streaming JSON paths for answer/think (segment-aware, conflict-guarded)
score_candidates_st Rank streaming (SSE) candidates for answer/think (temporal aggregation, delta-aware, conflict-guarded)
stream_reconstruct_text Reconstruct stream text from raw_json using exact or wildcard-index matching Falls back to regex (for ".." wildcard) if exact match finds nothing.
strip_optionals_from_body Strip optional runtime parameters from a request body
sub_placeholders Substitute placeholders '"\${API_KEY}"', '"\${CONTENT}"', '"\${ROLE}"' robustly
trial_experiment Run LLM Trial Experiment
update_progress_bar Update progress bar for an experiment
validate_experiment_config Validate experiment configuration and resolve API URL
validate_registry_entry Validate structure of a registry entry
validate_registry_schema Validate a PsyLingLLM Registry Document