edsl 0.1.44__tar.gz → 0.1.46__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- edsl-0.1.46/PKG-INFO +246 -0
- edsl-0.1.46/README.md +190 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/Base.py +7 -3
- edsl-0.1.46/edsl/__version__.py +1 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/agents/InvigilatorBase.py +3 -1
- {edsl-0.1.44 → edsl-0.1.46}/edsl/agents/PromptConstructor.py +66 -91
- edsl-0.1.46/edsl/agents/QuestionInstructionPromptBuilder.py +268 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/agents/QuestionTemplateReplacementsBuilder.py +80 -17
- {edsl-0.1.44 → edsl-0.1.46}/edsl/agents/question_option_processor.py +15 -6
- {edsl-0.1.44 → edsl-0.1.46}/edsl/coop/CoopFunctionsMixin.py +3 -4
- {edsl-0.1.44 → edsl-0.1.46}/edsl/coop/coop.py +171 -96
- {edsl-0.1.44 → edsl-0.1.46}/edsl/data/RemoteCacheSync.py +10 -9
- {edsl-0.1.44 → edsl-0.1.46}/edsl/enums.py +3 -3
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/AnthropicService.py +11 -9
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/AvailableModelFetcher.py +2 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/AwsBedrock.py +1 -2
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/AzureAI.py +12 -9
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/GoogleService.py +9 -4
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/InferenceServicesCollection.py +2 -2
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/MistralAIService.py +1 -2
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/OpenAIService.py +9 -4
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/PerplexityService.py +2 -1
- edsl-0.1.44/edsl/inference_services/GrokService.py → edsl-0.1.46/edsl/inference_services/XAIService.py +2 -2
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/registry.py +2 -2
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/AnswerQuestionFunctionConstructor.py +12 -1
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/Jobs.py +24 -17
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/JobsChecks.py +10 -13
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/JobsPrompts.py +49 -26
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/JobsRemoteInferenceHandler.py +4 -5
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/async_interview_runner.py +3 -1
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/check_survey_scenario_compatibility.py +5 -5
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/data_structures.py +3 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/interviews/Interview.py +6 -3
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/interviews/InterviewExceptionEntry.py +12 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/tasks/TaskHistory.py +1 -1
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/LanguageModel.py +6 -3
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/PriceManager.py +45 -5
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/model.py +47 -26
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionBase.py +21 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionBasePromptsMixin.py +103 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionFreeText.py +22 -5
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/descriptors.py +4 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/question_base_gen_mixin.py +96 -29
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/Dataset.py +65 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/DatasetExportMixin.py +320 -32
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/Result.py +27 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/Results.py +22 -2
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/ResultsGGMixin.py +7 -3
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/DocumentChunker.py +2 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/FileStore.py +10 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/PdfExtractor.py +21 -1
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/Scenario.py +25 -9
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/ScenarioList.py +226 -24
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/__init__.py +1 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/docx.py +5 -1
- edsl-0.1.46/edsl/scenarios/handlers/jpeg.py +39 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/Survey.py +5 -4
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/SurveyFlowVisualization.py +91 -43
- {edsl-0.1.44 → edsl-0.1.46}/edsl/templates/error_reporting/exceptions_table.html +7 -8
- {edsl-0.1.44 → edsl-0.1.46}/edsl/templates/error_reporting/interview_details.html +1 -1
- {edsl-0.1.44 → edsl-0.1.46}/edsl/templates/error_reporting/interviews.html +0 -1
- edsl-0.1.46/edsl/templates/error_reporting/overview.html +26 -0
- edsl-0.1.46/edsl/templates/error_reporting/performance_plot.html +2 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/templates/error_reporting/report.css +1 -1
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/PrettyList.py +14 -0
- {edsl-0.1.44 → edsl-0.1.46}/pyproject.toml +2 -2
- edsl-0.1.44/PKG-INFO +0 -110
- edsl-0.1.44/README.md +0 -54
- edsl-0.1.44/edsl/__version__.py +0 -1
- edsl-0.1.44/edsl/agents/QuestionInstructionPromptBuilder.py +0 -187
- edsl-0.1.44/edsl/templates/error_reporting/overview.html +0 -31
- edsl-0.1.44/edsl/templates/error_reporting/performance_plot.html +0 -2
- {edsl-0.1.44 → edsl-0.1.46}/LICENSE +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/BaseDiff.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/TemplateLoader.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/agents/Agent.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/agents/AgentList.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/agents/Invigilator.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/agents/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/agents/descriptors.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/agents/prompt_helpers.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/auto/AutoStudy.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/auto/StageBase.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/auto/StageGenerateSurvey.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/auto/StageLabelQuestions.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/auto/StagePersona.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/auto/StagePersonaDimensionValueRanges.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/auto/StagePersonaDimensionValues.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/auto/StagePersonaDimensions.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/auto/StageQuestions.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/auto/SurveyCreatorPipeline.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/auto/utilities.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/base/Base.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/config.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/conversation/Conversation.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/conversation/car_buying.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/conversation/chips.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/conversation/mug_negotiation.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/conversation/next_speaker_utilities.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/coop/ExpectedParrotKeyHandler.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/coop/PriceFetcher.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/coop/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/coop/utils.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/data/Cache.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/data/CacheEntry.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/data/CacheHandler.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/data/SQLiteDict.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/data/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/data/orm.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/data_transfer_models.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/BaseException.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/agents.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/cache.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/configuration.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/coop.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/data.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/general.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/inference_services.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/jobs.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/language_models.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/prompts.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/questions.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/results.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/scenarios.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/exceptions/surveys.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/AvailableModelCacheHandler.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/DeepInfraService.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/DeepSeekService.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/GroqService.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/InferenceServiceABC.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/OllamaService.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/ServiceAvailability.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/TestService.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/TogetherAIService.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/data_structures.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/models_available_cache.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/rate_limits_cache.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/inference_services/write_available.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/Answers.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/FetchInvigilator.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/InterviewTaskManager.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/InterviewsConstructor.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/JobsComponentConstructor.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/JobsRemoteInferenceLogger.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/RequestTokenEstimator.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/buckets/BucketCollection.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/buckets/ModelBuckets.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/buckets/TokenBucket.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/buckets/TokenBucketAPI.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/buckets/TokenBucketClient.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/decorators.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/interviews/InterviewExceptionCollection.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/interviews/InterviewStatistic.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/interviews/InterviewStatisticsCollection.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/interviews/InterviewStatusDictionary.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/interviews/InterviewStatusLog.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/interviews/ReportErrors.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/interviews/interview_status_enum.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/jobs_status_enums.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/loggers/HTMLTableJobLogger.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/results_exceptions_handler.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/runners/JobsRunnerAsyncio.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/runners/JobsRunnerStatus.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/runners/JobsRunnerStatusData.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/tasks/QuestionTaskCreator.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/tasks/TaskCreators.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/tasks/TaskStatusLog.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/tasks/task_status_enum.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/tokens/InterviewTokenUsage.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/jobs/tokens/TokenUsage.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/ComputeCost.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/ModelList.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/RawResponseHandler.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/RegisterLanguageModelsMeta.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/ServiceDataSources.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/fake_openai_call.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/fake_openai_service.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/key_management/KeyLookup.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/key_management/KeyLookupBuilder.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/key_management/KeyLookupCollection.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/key_management/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/key_management/models.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/repair.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/language_models/utilities.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/notebooks/Notebook.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/notebooks/NotebookToLaTeX.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/notebooks/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/prompts/Prompt.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/prompts/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/ExceptionExplainer.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/HTMLQuestion.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionBudget.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionCheckBox.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionDict.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionExtract.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionFunctional.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionList.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionMatrix.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionMultipleChoice.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionNumerical.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/QuestionRank.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/Quick.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/SimpleAskMixin.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/answer_validator_mixin.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/compose_questions.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/data_structures.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/decorators.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/derived/QuestionLikertFive.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/derived/QuestionLinearScale.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/derived/QuestionTopK.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/derived/QuestionYesNo.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/derived/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/loop_processor.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/prompt_templates/question_budget.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/prompt_templates/question_checkbox.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/prompt_templates/question_extract.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/prompt_templates/question_free_text.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/prompt_templates/question_linear_scale.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/prompt_templates/question_list.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/prompt_templates/question_multiple_choice.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/prompt_templates/question_numerical.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/question_registry.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/register_questions_meta.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/response_validator_abc.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/response_validator_factory.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/settings.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/budget/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/budget/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/budget/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/checkbox/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/checkbox/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/checkbox/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/dict/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/dict/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/dict/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/extract/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/extract/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/extract/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/free_text/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/free_text/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/free_text/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/likert_five/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/likert_five/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/likert_five/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/linear_scale/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/linear_scale/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/linear_scale/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/list/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/list/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/list/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/matrix/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/matrix/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/matrix/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/multiple_choice/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/multiple_choice/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/multiple_choice/html.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/multiple_choice/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/numerical/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/numerical/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/numerical/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/rank/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/rank/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/rank/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/top_k/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/top_k/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/top_k/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/yes_no/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/yes_no/answering_instructions.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/questions/templates/yes_no/question_presentation.jinja +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/CSSParameterizer.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/DatasetTree.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/MarkdownToDocx.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/MarkdownToPDF.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/ResultsExportMixin.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/TableDisplay.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/TextEditor.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/file_exports.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/results_fetch_mixin.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/results_selector.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/results_tools_mixin.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/smart_objects.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/table_data_class.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/table_display.css +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/table_renderers.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/results/tree_explore.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/ConstructDownloadLink.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/DocxScenario.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/ScenarioHtmlMixin.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/ScenarioListExportMixin.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/ScenarioListPdfMixin.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/directory_scanner.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/file_methods.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/csv.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/html.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/json.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/latex.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/md.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/pdf.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/png.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/pptx.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/py.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/sql.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/sqlite.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/handlers/txt.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/scenario_join.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/scenarios/scenario_selector.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/shared.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/study/ObjectEntry.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/study/ProofOfWork.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/study/SnapShot.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/study/Study.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/study/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/ConstructDAG.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/DAG.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/EditSurvey.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/InstructionHandler.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/Memory.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/MemoryManagement.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/MemoryPlan.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/Rule.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/RuleCollection.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/RuleManager.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/Simulator.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/SurveyCSS.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/SurveyExportMixin.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/SurveyQualtricsImport.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/SurveyToApp.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/base.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/descriptors.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/instructions/ChangeInstruction.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/instructions/Instruction.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/instructions/InstructionCollection.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/surveys/instructions/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/templates/error_reporting/base.html +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/templates/error_reporting/exceptions_by_model.html +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/templates/error_reporting/exceptions_by_question_name.html +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/templates/error_reporting/exceptions_by_type.html +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/templates/error_reporting/report.html +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/templates/error_reporting/report.js +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/tools/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/tools/clusters.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/tools/embeddings.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/tools/embeddings_plotting.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/tools/plotting.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/tools/summarize.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/SystemInfo.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/ast_utilities.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/data/Registry.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/data/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/data/scooter_results.json +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/decorators.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/gcp_bucket/__init__.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/gcp_bucket/cloud_storage.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/interface.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/is_notebook.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/is_valid_variable_name.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/naming_utilities.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/remove_edsl_version.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/repair_functions.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/restricted_python.py +0 -0
- {edsl-0.1.44 → edsl-0.1.46}/edsl/utilities/utilities.py +0 -0
edsl-0.1.46/PKG-INFO
ADDED
@@ -0,0 +1,246 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: edsl
|
3
|
+
Version: 0.1.46
|
4
|
+
Summary: Create and analyze LLM-based surveys
|
5
|
+
Home-page: https://www.expectedparrot.com/
|
6
|
+
License: MIT
|
7
|
+
Keywords: LLM,social science,surveys,user research
|
8
|
+
Author: John Horton
|
9
|
+
Author-email: info@expectedparrot.com
|
10
|
+
Requires-Python: >=3.9.1,<3.13
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
17
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
19
|
+
Requires-Dist: aiohttp (>=3.9.1,<4.0.0)
|
20
|
+
Requires-Dist: anthropic (>=0.45.0,<0.46.0)
|
21
|
+
Requires-Dist: azure-ai-inference (>=1.0.0b3,<2.0.0)
|
22
|
+
Requires-Dist: black[jupyter] (>=24.4.2,<25.0.0)
|
23
|
+
Requires-Dist: boto3 (>=1.34.161,<2.0.0)
|
24
|
+
Requires-Dist: google-generativeai (>=0.8.2,<0.9.0)
|
25
|
+
Requires-Dist: groq (>=0.9.0,<0.10.0)
|
26
|
+
Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
|
27
|
+
Requires-Dist: json-repair (>=0.28.4,<0.29.0)
|
28
|
+
Requires-Dist: jupyter (>=1.0.0,<2.0.0)
|
29
|
+
Requires-Dist: markdown2 (>=2.4.11,<3.0.0)
|
30
|
+
Requires-Dist: matplotlib (>=3.8,<3.9)
|
31
|
+
Requires-Dist: mistralai (>=1.0.2,<2.0.0)
|
32
|
+
Requires-Dist: nest-asyncio (>=1.5.9,<2.0.0)
|
33
|
+
Requires-Dist: numpy (>=1.22,<2.0)
|
34
|
+
Requires-Dist: openai (>=1.4.0,<2.0.0)
|
35
|
+
Requires-Dist: openpyxl (>=3.1.5,<4.0.0)
|
36
|
+
Requires-Dist: pandas (>=2.1.4,<3.0.0)
|
37
|
+
Requires-Dist: platformdirs (>=4.3.6,<5.0.0)
|
38
|
+
Requires-Dist: pydot (>=2.0.0,<3.0.0)
|
39
|
+
Requires-Dist: pygments (>=2.17.2,<3.0.0)
|
40
|
+
Requires-Dist: pypdf2 (>=3.0.1,<4.0.0)
|
41
|
+
Requires-Dist: pyreadstat (>=1.2.7,<2.0.0)
|
42
|
+
Requires-Dist: python-docx (>=1.1.0,<2.0.0)
|
43
|
+
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
|
44
|
+
Requires-Dist: python-pptx (>=1.0.2,<2.0.0)
|
45
|
+
Requires-Dist: restrictedpython (>=7.1,<8.0)
|
46
|
+
Requires-Dist: rich (>=13.7.0,<14.0.0)
|
47
|
+
Requires-Dist: setuptools (<72.0)
|
48
|
+
Requires-Dist: simpleeval (>=0.9.13,<0.10.0)
|
49
|
+
Requires-Dist: sqlalchemy (>=2.0.23,<3.0.0)
|
50
|
+
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
51
|
+
Requires-Dist: tenacity (>=8.2.3,<9.0.0)
|
52
|
+
Requires-Dist: urllib3 (>=1.25.4,<1.27)
|
53
|
+
Project-URL: Documentation, https://docs.expectedparrot.com
|
54
|
+
Description-Content-Type: text/markdown
|
55
|
+
|
56
|
+
# Expected Parrot Domain-Specific Language (EDSL)
|
57
|
+
|
58
|
+
The Expected Parrot Domain-Specific Language (EDSL) package makes it easy to conduct computational social science and market research with AI. Use it to design surveys and experiments, collect responses from humans and large language models, and perform data labeling and many other research tasks. Results are formatted as specified datasets and come with built-in methods for analyzing, visualizing and sharing.
|
59
|
+
|
60
|
+
<p align="right">
|
61
|
+
<img src="https://github.com/expectedparrot/edsl/blob/main/static/logo.png?raw=true" alt="edsl.png" width="100"/>
|
62
|
+
</p>
|
63
|
+
|
64
|
+
## Features
|
65
|
+
|
66
|
+
**Declarative design**:
|
67
|
+
Specified <a href="https://docs.expectedparrot.con/en/latest/questions.html" target="_blank" rel="noopener noreferrer">question types</a> ensure consistent results without requiring a JSON schema (<a href="https://www.expectedparrot.com/content/2a848a0e-f9de-46bc-98d0-a13b9a1caf11" target="_blank" rel="noopener noreferrer">view at Coop</a>):
|
68
|
+
|
69
|
+
```python
|
70
|
+
from edsl import QuestionMultipleChoice
|
71
|
+
|
72
|
+
q = QuestionMultipleChoice(
|
73
|
+
question_name = "example",
|
74
|
+
question_text = "How do you feel today?",
|
75
|
+
question_options = ["Bad", "OK", "Good"]
|
76
|
+
)
|
77
|
+
|
78
|
+
results = q.run()
|
79
|
+
|
80
|
+
results.select("example")
|
81
|
+
```
|
82
|
+
|
83
|
+
> | answer.example |
|
84
|
+
> |-----------------|
|
85
|
+
> | Good |
|
86
|
+
|
87
|
+
<br>
|
88
|
+
|
89
|
+
**Parameterized prompts**:
|
90
|
+
Easily parameterize and control prompts with "<a href="https://docs.expectedparrot.com/en/latest/scenarios.html" target="_blank" rel="noopener noreferrer">scenarios</a>" of data automatically imported from many sources (CSV, PDF, PNG, etc.)(<a href="https://www.expectedparrot.com/content/7bb9ec2e-827b-4867-ac02-33163df1a1d1" target="_blank" rel="noopener noreferrer">view at Coop</a>):
|
91
|
+
|
92
|
+
```python
|
93
|
+
from edsl import ScenarioList, QuestionLinearScale
|
94
|
+
|
95
|
+
q = QuestionLinearScale(
|
96
|
+
question_name = "example",
|
97
|
+
question_text = "How much do you enjoy {{ activity }}?",
|
98
|
+
question_options = [1,2,3,4,5,],
|
99
|
+
option_labels = {1:"Not at all", 5:"Very much"}
|
100
|
+
)
|
101
|
+
|
102
|
+
sl = ScenarioList.from_list("activity", ["coding", "sleeping"])
|
103
|
+
|
104
|
+
results = q.by(sl).run()
|
105
|
+
|
106
|
+
results.select("activity", "example")
|
107
|
+
```
|
108
|
+
|
109
|
+
> | scenario.activity | answer.example |
|
110
|
+
> |--------------------|-----------------|
|
111
|
+
> | Coding | 5 |
|
112
|
+
> | Sleeping | 5 |
|
113
|
+
|
114
|
+
<br>
|
115
|
+
|
116
|
+
**Design AI agent personas to answer questions**:
|
117
|
+
Construct agents with relevant traits to provide diverse responses to your surveys (<a href="https://www.expectedparrot.com/content/b639a2d7-4ae6-48fe-8b9e-58350fab93de" target="_blank" rel="noopener noreferrer">view at Coop</a>)
|
118
|
+
|
119
|
+
```python
|
120
|
+
from edsl import Agent, AgentList, QuestionList
|
121
|
+
|
122
|
+
al = AgentList(Agent(traits = {"persona":p}) for p in ["botanist", "detective"])
|
123
|
+
|
124
|
+
q = QuestionList(
|
125
|
+
question_name = "example",
|
126
|
+
question_text = "What are your favorite colors?",
|
127
|
+
max_list_items = 3
|
128
|
+
)
|
129
|
+
|
130
|
+
results = q.by(al).run()
|
131
|
+
|
132
|
+
results.select("persona", "example")
|
133
|
+
```
|
134
|
+
|
135
|
+
> | agent.persona | answer.example |
|
136
|
+
> |----------------|---------------------------------------------|
|
137
|
+
> | botanist | ['Green', 'Earthy Brown', 'Sunset Orange'] |
|
138
|
+
> | detective | ['Gray', 'Black', 'Navy Blye'] |
|
139
|
+
|
140
|
+
<br>
|
141
|
+
|
142
|
+
**Simplified access to LLMs**:
|
143
|
+
Choose whether to use your own keys for LLMs, or access all <a href="https://www.expectedparrot.com/getting-started/coop-pricing" target="_blank" rel="noopener noreferrer">available models</a> with an Expected Parrot API key. Run surveys with many models at once and compare responses at a convenient inferface (<a href="https://www.expectedparrot.com/content/044465f0-b87f-430d-a3b9-4fd3b8560299" target="_blank" rel="noopener noreferrer">view at Coop</a>)
|
144
|
+
|
145
|
+
```python
|
146
|
+
from edsl import Model, ModelList, QuestionFreeText
|
147
|
+
|
148
|
+
ml = ModelList(Model(m) for m in ["gpt-4o", "gemini-1.5-flash"])
|
149
|
+
|
150
|
+
q = QuestionFreeText(
|
151
|
+
question_name = "example",
|
152
|
+
question_text = "What is your top tip for using LLMs to answer surveys?"
|
153
|
+
)
|
154
|
+
|
155
|
+
results = q.by(ml).run()
|
156
|
+
|
157
|
+
results.select("model", "example")
|
158
|
+
```
|
159
|
+
|
160
|
+
> | model.model | answer.example |
|
161
|
+
> |--------------------|-------------------------------------------------------------------------------------------------|
|
162
|
+
> | gpt-4o | When using large language models (LLMs) to answer surveys, my top tip is to ensure that the ... |
|
163
|
+
> | gemini-1.5-flash | My top tip for using LLMs to answer surveys is to **treat the LLM as a sophisticated brainst... |
|
164
|
+
|
165
|
+
<br>
|
166
|
+
|
167
|
+
**Piping & skip-logic**:
|
168
|
+
Build rich data labeling flows with features for piping answers and adding survey logic such as skip and stop rules (<a href="https://www.expectedparrot.com/content/b8afe09d-49bf-4c05-b753-d7b0ae782eb3" target="_blank" rel="noopener noreferrer">view at Coop</a>):
|
169
|
+
|
170
|
+
```python
|
171
|
+
from edsl import QuestionMultipleChoice, QuestionFreeText, Survey
|
172
|
+
|
173
|
+
q1 = QuestionMultipleChoice(
|
174
|
+
question_name = "color",
|
175
|
+
question_text = "What is your favorite primary color?",
|
176
|
+
question_options = ["red", "yellow", "blue"]
|
177
|
+
)
|
178
|
+
|
179
|
+
q2 = QuestionFreeText(
|
180
|
+
question_name = "flower",
|
181
|
+
question_text = "Name a flower that is {{ color.answer }}."
|
182
|
+
)
|
183
|
+
|
184
|
+
survey = Survey(questions = [q1, q2])
|
185
|
+
|
186
|
+
results = survey.run()
|
187
|
+
|
188
|
+
results.select("color", "flower")
|
189
|
+
```
|
190
|
+
|
191
|
+
> | answer.color | answer.flower |
|
192
|
+
> |---------------|-----------------------------------------------------------------------------------|
|
193
|
+
> | blue | A commonly known blue flower is the bluebell. Another example is the cornflower. |
|
194
|
+
|
195
|
+
<br>
|
196
|
+
|
197
|
+
**Caching**:
|
198
|
+
API calls to LLMs are cached automatically, allowing you to retrieve responses to questions that have already been run and reproduce experiments at no cost. Learn more about how the <a href="https://docs.expectedparrot.com/en/latest/remote_caching.html" target="_blank" rel="noopener noreferrer">universal remote cache</a> works.
|
199
|
+
|
200
|
+
**Flexibility**:
|
201
|
+
Choose whether to run surveys on your own computer or at the Expected Parrot server.
|
202
|
+
|
203
|
+
**Tools for collaboration**:
|
204
|
+
Easily share workflows and projects privately or publicly at Coop: an integrated platform for AI-based research. Your account comes with free credits for running surveys, and lets you securely share keys, track expenses and usage for your team.
|
205
|
+
|
206
|
+
**Built-in tools for analyis**:
|
207
|
+
Analyze results as specified datasets from your account or workspace. Easily import data to use with your surveys and export results.
|
208
|
+
|
209
|
+
## Getting started
|
210
|
+
|
211
|
+
1. Run `pip install edsl` to install the package.
|
212
|
+
|
213
|
+
2. <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Create an account</a> to run surveys at the Expected Parrot server and access a <a href="https://docs.expectedparrot.com/en/latest/remote_caching.html" target="_blank" rel="noopener noreferrer">universal remote cache</a> of stored responses for reproducing results.
|
214
|
+
|
215
|
+
3. Choose whether to use your own keys for language models or get an Expected Parrot key to access all available models at once. Securely <a href="https://docs.expectedparrot.com/en/latest/api_keys.html" target="_blank" rel="noopener noreferrer">manage keys</a>, share expenses and track usage for your team from your account.
|
216
|
+
|
217
|
+
4. Run the <a href="https://docs.expectedparrot.com/en/latest/starter_tutorial.html" target="_blank" rel="noopener noreferrer">starter tutorial</a> and explore other demo notebooks.
|
218
|
+
|
219
|
+
5. Share workflows and survey results at <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Coop</a>
|
220
|
+
|
221
|
+
6. Join our <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a> for updates and discussions! Request new features!
|
222
|
+
|
223
|
+
## Code & Docs
|
224
|
+
- <a href="https://pypi.org/project/edsl/" target="_blank" rel="noopener noreferrer">PyPI</a>
|
225
|
+
- <a href="https://github.com/expectedparrot/edsl" target="_blank" rel="noopener noreferrer">GitHub</a>
|
226
|
+
- <a href="https://docs.expectedparrot.com" target="_blank" rel="noopener noreferrer">Documentation</a>
|
227
|
+
|
228
|
+
## Requirements
|
229
|
+
- Python 3.9 - 3.12
|
230
|
+
- API keys for language models. You can use your own keys or an Expected Parrot key that provides access to all available models.
|
231
|
+
See instructions on <a href="https://docs.expectedparrot.com/en/latest/api_keys.html" target="_blank" rel="noopener noreferrer">managing keys</a> and <a href="https://www.expectedparrot.com/getting-started/coop-pricing" target="_blank" rel="noopener noreferrer">model pricing and performance</a> information.
|
232
|
+
|
233
|
+
## Coop
|
234
|
+
An integrated platform for running experiments, sharing workflows and launching hybrid human/AI surveys.
|
235
|
+
- <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Login / Signup</a>
|
236
|
+
- <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Explore</a>
|
237
|
+
|
238
|
+
## Community
|
239
|
+
- <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a>
|
240
|
+
- <a href="https://x.com/ExpectedParrot" target="_blank" rel="noopener noreferrer">Twitter</a>
|
241
|
+
- <a href="https://www.linkedin.com/company/expectedparrot/" target="_blank" rel="noopener noreferrer">LinkedIn</a>
|
242
|
+
- <a href="https://blog.expectedparrot.com" target="_blank" rel="noopener noreferrer">Blog</a>
|
243
|
+
|
244
|
+
## Contact
|
245
|
+
- <a href="mailto:info@expectedparrot.com" target="_blank" rel="noopener noreferrer">Email</a>
|
246
|
+
|
edsl-0.1.46/README.md
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
# Expected Parrot Domain-Specific Language (EDSL)
|
2
|
+
|
3
|
+
The Expected Parrot Domain-Specific Language (EDSL) package makes it easy to conduct computational social science and market research with AI. Use it to design surveys and experiments, collect responses from humans and large language models, and perform data labeling and many other research tasks. Results are formatted as specified datasets and come with built-in methods for analyzing, visualizing and sharing.
|
4
|
+
|
5
|
+
<p align="right">
|
6
|
+
<img src="https://github.com/expectedparrot/edsl/blob/main/static/logo.png?raw=true" alt="edsl.png" width="100"/>
|
7
|
+
</p>
|
8
|
+
|
9
|
+
## Features
|
10
|
+
|
11
|
+
**Declarative design**:
|
12
|
+
Specified <a href="https://docs.expectedparrot.con/en/latest/questions.html" target="_blank" rel="noopener noreferrer">question types</a> ensure consistent results without requiring a JSON schema (<a href="https://www.expectedparrot.com/content/2a848a0e-f9de-46bc-98d0-a13b9a1caf11" target="_blank" rel="noopener noreferrer">view at Coop</a>):
|
13
|
+
|
14
|
+
```python
|
15
|
+
from edsl import QuestionMultipleChoice
|
16
|
+
|
17
|
+
q = QuestionMultipleChoice(
|
18
|
+
question_name = "example",
|
19
|
+
question_text = "How do you feel today?",
|
20
|
+
question_options = ["Bad", "OK", "Good"]
|
21
|
+
)
|
22
|
+
|
23
|
+
results = q.run()
|
24
|
+
|
25
|
+
results.select("example")
|
26
|
+
```
|
27
|
+
|
28
|
+
> | answer.example |
|
29
|
+
> |-----------------|
|
30
|
+
> | Good |
|
31
|
+
|
32
|
+
<br>
|
33
|
+
|
34
|
+
**Parameterized prompts**:
|
35
|
+
Easily parameterize and control prompts with "<a href="https://docs.expectedparrot.com/en/latest/scenarios.html" target="_blank" rel="noopener noreferrer">scenarios</a>" of data automatically imported from many sources (CSV, PDF, PNG, etc.)(<a href="https://www.expectedparrot.com/content/7bb9ec2e-827b-4867-ac02-33163df1a1d1" target="_blank" rel="noopener noreferrer">view at Coop</a>):
|
36
|
+
|
37
|
+
```python
|
38
|
+
from edsl import ScenarioList, QuestionLinearScale
|
39
|
+
|
40
|
+
q = QuestionLinearScale(
|
41
|
+
question_name = "example",
|
42
|
+
question_text = "How much do you enjoy {{ activity }}?",
|
43
|
+
question_options = [1,2,3,4,5,],
|
44
|
+
option_labels = {1:"Not at all", 5:"Very much"}
|
45
|
+
)
|
46
|
+
|
47
|
+
sl = ScenarioList.from_list("activity", ["coding", "sleeping"])
|
48
|
+
|
49
|
+
results = q.by(sl).run()
|
50
|
+
|
51
|
+
results.select("activity", "example")
|
52
|
+
```
|
53
|
+
|
54
|
+
> | scenario.activity | answer.example |
|
55
|
+
> |--------------------|-----------------|
|
56
|
+
> | Coding | 5 |
|
57
|
+
> | Sleeping | 5 |
|
58
|
+
|
59
|
+
<br>
|
60
|
+
|
61
|
+
**Design AI agent personas to answer questions**:
|
62
|
+
Construct agents with relevant traits to provide diverse responses to your surveys (<a href="https://www.expectedparrot.com/content/b639a2d7-4ae6-48fe-8b9e-58350fab93de" target="_blank" rel="noopener noreferrer">view at Coop</a>)
|
63
|
+
|
64
|
+
```python
|
65
|
+
from edsl import Agent, AgentList, QuestionList
|
66
|
+
|
67
|
+
al = AgentList(Agent(traits = {"persona":p}) for p in ["botanist", "detective"])
|
68
|
+
|
69
|
+
q = QuestionList(
|
70
|
+
question_name = "example",
|
71
|
+
question_text = "What are your favorite colors?",
|
72
|
+
max_list_items = 3
|
73
|
+
)
|
74
|
+
|
75
|
+
results = q.by(al).run()
|
76
|
+
|
77
|
+
results.select("persona", "example")
|
78
|
+
```
|
79
|
+
|
80
|
+
> | agent.persona | answer.example |
|
81
|
+
> |----------------|---------------------------------------------|
|
82
|
+
> | botanist | ['Green', 'Earthy Brown', 'Sunset Orange'] |
|
83
|
+
> | detective | ['Gray', 'Black', 'Navy Blye'] |
|
84
|
+
|
85
|
+
<br>
|
86
|
+
|
87
|
+
**Simplified access to LLMs**:
|
88
|
+
Choose whether to use your own keys for LLMs, or access all <a href="https://www.expectedparrot.com/getting-started/coop-pricing" target="_blank" rel="noopener noreferrer">available models</a> with an Expected Parrot API key. Run surveys with many models at once and compare responses at a convenient inferface (<a href="https://www.expectedparrot.com/content/044465f0-b87f-430d-a3b9-4fd3b8560299" target="_blank" rel="noopener noreferrer">view at Coop</a>)
|
89
|
+
|
90
|
+
```python
|
91
|
+
from edsl import Model, ModelList, QuestionFreeText
|
92
|
+
|
93
|
+
ml = ModelList(Model(m) for m in ["gpt-4o", "gemini-1.5-flash"])
|
94
|
+
|
95
|
+
q = QuestionFreeText(
|
96
|
+
question_name = "example",
|
97
|
+
question_text = "What is your top tip for using LLMs to answer surveys?"
|
98
|
+
)
|
99
|
+
|
100
|
+
results = q.by(ml).run()
|
101
|
+
|
102
|
+
results.select("model", "example")
|
103
|
+
```
|
104
|
+
|
105
|
+
> | model.model | answer.example |
|
106
|
+
> |--------------------|-------------------------------------------------------------------------------------------------|
|
107
|
+
> | gpt-4o | When using large language models (LLMs) to answer surveys, my top tip is to ensure that the ... |
|
108
|
+
> | gemini-1.5-flash | My top tip for using LLMs to answer surveys is to **treat the LLM as a sophisticated brainst... |
|
109
|
+
|
110
|
+
<br>
|
111
|
+
|
112
|
+
**Piping & skip-logic**:
|
113
|
+
Build rich data labeling flows with features for piping answers and adding survey logic such as skip and stop rules (<a href="https://www.expectedparrot.com/content/b8afe09d-49bf-4c05-b753-d7b0ae782eb3" target="_blank" rel="noopener noreferrer">view at Coop</a>):
|
114
|
+
|
115
|
+
```python
|
116
|
+
from edsl import QuestionMultipleChoice, QuestionFreeText, Survey
|
117
|
+
|
118
|
+
q1 = QuestionMultipleChoice(
|
119
|
+
question_name = "color",
|
120
|
+
question_text = "What is your favorite primary color?",
|
121
|
+
question_options = ["red", "yellow", "blue"]
|
122
|
+
)
|
123
|
+
|
124
|
+
q2 = QuestionFreeText(
|
125
|
+
question_name = "flower",
|
126
|
+
question_text = "Name a flower that is {{ color.answer }}."
|
127
|
+
)
|
128
|
+
|
129
|
+
survey = Survey(questions = [q1, q2])
|
130
|
+
|
131
|
+
results = survey.run()
|
132
|
+
|
133
|
+
results.select("color", "flower")
|
134
|
+
```
|
135
|
+
|
136
|
+
> | answer.color | answer.flower |
|
137
|
+
> |---------------|-----------------------------------------------------------------------------------|
|
138
|
+
> | blue | A commonly known blue flower is the bluebell. Another example is the cornflower. |
|
139
|
+
|
140
|
+
<br>
|
141
|
+
|
142
|
+
**Caching**:
|
143
|
+
API calls to LLMs are cached automatically, allowing you to retrieve responses to questions that have already been run and reproduce experiments at no cost. Learn more about how the <a href="https://docs.expectedparrot.com/en/latest/remote_caching.html" target="_blank" rel="noopener noreferrer">universal remote cache</a> works.
|
144
|
+
|
145
|
+
**Flexibility**:
|
146
|
+
Choose whether to run surveys on your own computer or at the Expected Parrot server.
|
147
|
+
|
148
|
+
**Tools for collaboration**:
|
149
|
+
Easily share workflows and projects privately or publicly at Coop: an integrated platform for AI-based research. Your account comes with free credits for running surveys, and lets you securely share keys, track expenses and usage for your team.
|
150
|
+
|
151
|
+
**Built-in tools for analyis**:
|
152
|
+
Analyze results as specified datasets from your account or workspace. Easily import data to use with your surveys and export results.
|
153
|
+
|
154
|
+
## Getting started
|
155
|
+
|
156
|
+
1. Run `pip install edsl` to install the package.
|
157
|
+
|
158
|
+
2. <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Create an account</a> to run surveys at the Expected Parrot server and access a <a href="https://docs.expectedparrot.com/en/latest/remote_caching.html" target="_blank" rel="noopener noreferrer">universal remote cache</a> of stored responses for reproducing results.
|
159
|
+
|
160
|
+
3. Choose whether to use your own keys for language models or get an Expected Parrot key to access all available models at once. Securely <a href="https://docs.expectedparrot.com/en/latest/api_keys.html" target="_blank" rel="noopener noreferrer">manage keys</a>, share expenses and track usage for your team from your account.
|
161
|
+
|
162
|
+
4. Run the <a href="https://docs.expectedparrot.com/en/latest/starter_tutorial.html" target="_blank" rel="noopener noreferrer">starter tutorial</a> and explore other demo notebooks.
|
163
|
+
|
164
|
+
5. Share workflows and survey results at <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Coop</a>
|
165
|
+
|
166
|
+
6. Join our <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a> for updates and discussions! Request new features!
|
167
|
+
|
168
|
+
## Code & Docs
|
169
|
+
- <a href="https://pypi.org/project/edsl/" target="_blank" rel="noopener noreferrer">PyPI</a>
|
170
|
+
- <a href="https://github.com/expectedparrot/edsl" target="_blank" rel="noopener noreferrer">GitHub</a>
|
171
|
+
- <a href="https://docs.expectedparrot.com" target="_blank" rel="noopener noreferrer">Documentation</a>
|
172
|
+
|
173
|
+
## Requirements
|
174
|
+
- Python 3.9 - 3.12
|
175
|
+
- API keys for language models. You can use your own keys or an Expected Parrot key that provides access to all available models.
|
176
|
+
See instructions on <a href="https://docs.expectedparrot.com/en/latest/api_keys.html" target="_blank" rel="noopener noreferrer">managing keys</a> and <a href="https://www.expectedparrot.com/getting-started/coop-pricing" target="_blank" rel="noopener noreferrer">model pricing and performance</a> information.
|
177
|
+
|
178
|
+
## Coop
|
179
|
+
An integrated platform for running experiments, sharing workflows and launching hybrid human/AI surveys.
|
180
|
+
- <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Login / Signup</a>
|
181
|
+
- <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Explore</a>
|
182
|
+
|
183
|
+
## Community
|
184
|
+
- <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a>
|
185
|
+
- <a href="https://x.com/ExpectedParrot" target="_blank" rel="noopener noreferrer">Twitter</a>
|
186
|
+
- <a href="https://www.linkedin.com/company/expectedparrot/" target="_blank" rel="noopener noreferrer">LinkedIn</a>
|
187
|
+
- <a href="https://blog.expectedparrot.com" target="_blank" rel="noopener noreferrer">Blog</a>
|
188
|
+
|
189
|
+
## Contact
|
190
|
+
- <a href="mailto:info@expectedparrot.com" target="_blank" rel="noopener noreferrer">Email</a>
|
@@ -65,10 +65,10 @@ class PersistenceMixin:
|
|
65
65
|
def pull(
|
66
66
|
cls,
|
67
67
|
url_or_uuid: Optional[Union[str, UUID]] = None,
|
68
|
-
#expected_parrot_url: Optional[str] = None,
|
68
|
+
# expected_parrot_url: Optional[str] = None,
|
69
69
|
):
|
70
70
|
"""Pull the object from coop.
|
71
|
-
|
71
|
+
|
72
72
|
Args:
|
73
73
|
url_or_uuid: Either a UUID string or a URL pointing to the object
|
74
74
|
expected_parrot_url: Optional URL for the Parrot server
|
@@ -80,7 +80,11 @@ class PersistenceMixin:
|
|
80
80
|
coop = Coop()
|
81
81
|
|
82
82
|
# Determine if input is URL or UUID
|
83
|
-
if
|
83
|
+
if "www" in url_or_uuid:
|
84
|
+
url_or_uuid = url_or_uuid.replace("www", "api")
|
85
|
+
if url_or_uuid and (
|
86
|
+
"http://" in str(url_or_uuid) or "https://" in str(url_or_uuid)
|
87
|
+
):
|
84
88
|
return coop.get(url=url_or_uuid, expected_object_type=object_type)
|
85
89
|
else:
|
86
90
|
return coop.get(uuid=url_or_uuid, expected_object_type=object_type)
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.1.46"
|
@@ -74,7 +74,7 @@ class InvigilatorBase(ABC):
|
|
74
74
|
@property
|
75
75
|
def prompt_constructor(self) -> PromptConstructor:
|
76
76
|
"""Return the prompt constructor."""
|
77
|
-
return PromptConstructor(self, prompt_plan=self.prompt_plan)
|
77
|
+
return PromptConstructor.from_invigilator(self, prompt_plan=self.prompt_plan)
|
78
78
|
|
79
79
|
def to_dict(self, include_cache=False) -> Dict[str, Any]:
|
80
80
|
attributes = [
|
@@ -87,6 +87,7 @@ class InvigilatorBase(ABC):
|
|
87
87
|
"iteration",
|
88
88
|
"additional_prompt_data",
|
89
89
|
"survey",
|
90
|
+
"raw_model_response",
|
90
91
|
]
|
91
92
|
if include_cache:
|
92
93
|
attributes.append("cache")
|
@@ -135,6 +136,7 @@ class InvigilatorBase(ABC):
|
|
135
136
|
d["additional_prompt_data"] = data["additional_prompt_data"]
|
136
137
|
|
137
138
|
d = cls(**d)
|
139
|
+
d.raw_model_response = data.get("raw_model_response")
|
138
140
|
return d
|
139
141
|
|
140
142
|
def __repr__(self) -> str:
|