Edsl

Latest version: v0.1.23

Safety actively analyzes 630026 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

0.1.23

Added

- [In progress] New prompt visibility features.

- [In progress] New methods for piping responses to questions into other questions.

- [In progress] Optional parameter in `Results` method `to_list()` to flatten a list of lists (eg, responses to `QuestionList`): `results.to_list(flatten=True)`

Changed

- [In progress] `QuestionMultipleChoice` is being modified allow non-responsive answers. Previously, an error was thrown if the agent did not select one of the given options. Details TBD.

Fixed

Deprecated

Removed

0.1.22

Added

- New `Survey` method to export a survey to file. Usage: `generated_code = survey.code("example.py")`

Fixed

- A bug in `Survey` method `add_skip_logic()`

0.1.21

Added

- New methods for adding, sampling and shuffling `Results` objects:
`dup_results = results + results`
`results.shuffle()`
`results.sample(n=5)`

Changed

- Optional parameter `survey.run(cache=False)` if you do not want to access any cached results in running a survey.

- Instructions passed to an agent at creation are now a column of results: `agent_instruction`

0.1.20

Added

- <b>Methods for setting session caches</b>
New function `set_session_cache` will set the cache for a session:


from edsl import Cache, set_session_cache
set_session_cache(Cache())

The cache can be set to a specific cache object, or it can be set to a dictionary or SQLite3Dict object:

from edsl import Cache, set_session_cache
from edsl.data import SQLiteDict
set_session_cache(Cache(data = SQLiteDict("example.db")))
or
set_session_cache(Cache(data = {}))

The `unset_session_cache` function is used to unset the cache for a session:

from edsl import unset_session_cache
unset_session_cache()

This will unset the cache for the current session, and you will need to pass the cache object to the run method during the session.

Details: https://docs.expectedparrot.com/en/latest/data.html#setting-a-session-cache


Changed

- <b>Answer comments are now a separate component of results</b>
The "comment" field that is automatically added to each question (other than free text) is now stored in `Results` as `comment.<question_name>`. Prior to this change, the comment for each question was stored as `answer.<question_name>_comment`, i.e., if you ran `results.columns` the list of columns would include `answer.<question_name>` and `answer.<question_name>_comment` for each question. With this change, the columns will now be `answer.<question_name>` and `comment.<question_name>_comment`. This change is meant to make it easier to select only the answers, e.g., running `results.select('answer.*').print()` will no longer also include all the comments, which you may not want to display.
(The purpose of the comments field is to allow the model to add any information about its response to a question, which can help avoid problems with JSON formatting when the model does not want to return <i>just</i> the properly formatted response.)

- <b>Exceptions</b>
We modified exception messages. If your survey run generates exceptions, run `results.show_exceptions()` to print them in a table.


Fixed

- A package that was missing for working with Anthropic models.

0.1.19

Added
- `Results` objects now include columns for question components. Call the `.columns` method on your results to see a list of all components. Run `results.select("question_type.*", "question_text.*", "question_options.*").print()` to see them.

- `Survey` objects now also have a `.to_csv()` method.

Changed
- Increased the maximum number of multiple choice answer options to 200 (previously 20) to facilitate large codebooks / data labels.

0.1.18

Fixed
- A bug in in `Survey.add_rule()` method that caused an additional question to be skipped when used to apply a skip rule.

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.