Projects
Projects are the top-level organisational unit in the Hub. All agents, datasets, evaluations, and scans belong to a project.
Create a project
Section titled “Create a project”from giskard_hub import HubClient
hub = HubClient()
project = hub.projects.create( name="My Agent App", description="Evaluation workspace for the production chatbot",)
print(project.id)List and retrieve projects
Section titled “List and retrieve projects”# List all projects you have access toprojects = hub.projects.list()
# Retrieve a specific project by IDproject = hub.projects.retrieve("project-id")Update and delete a project
Section titled “Update and delete a project”hub.projects.update("project-id", name="Renamed Project")
hub.projects.delete("project-id")Prompt Presets
Section titled “Prompt Presets”Prompt Presets are reusable templates that describe a persona, a topic, or a behaviour pattern within a project. They are used as input when generating preset-based datasets via hub.datasets.generate_preset_based().
Create a prompt preset
Section titled “Create a prompt preset”prompt_preset = hub.projects.prompt_presets.create( "project-id", name="Angry customer asking for refund", description="The user is frustrated and demands an immediate refund for a defective product.", rules=[ "The agent should not ask for the user's credit card number", ],)
print(prompt_preset.id)Preview generated questions from a prompt preset
Section titled “Preview generated questions from a prompt preset”Before generating a full dataset, you can preview a single sample conversation that a prompt preset would produce:
preview = hub.projects.prompt_presets.preview( "project-id", agent_id="agent-id", description="The user is frustrated and demands an immediate refund for a defective product.",)
print(preview.inputs)List and manage prompt presets
Section titled “List and manage prompt presets”prompt_presets = hub.projects.prompt_presets.list("project-id")
hub.projects.prompt_presets.update( "prompt-preset-id", project_id="project-id", name="Updated name")
hub.projects.prompt_presets.delete("prompt-preset-id", project_id="project-id")