Skip to content

feat(cli): Support configuration profiles for common option sets #28

@berntpopp

Description

@berntpopp

The CLI commands, particularly phentrieve query and phentrieve text process, have a significant number of options. To improve usability for common workflows, allow users to define named "profiles" in the phentrieve.yaml configuration file. These profiles would pre-set groups of command-line options.

Example phentrieve.yaml:

profiles:
  high_recall_german:
    command: text process
    language: de
    strategy: semantic
    model_name: "jinaai/jina-embeddings-v2-base-de"
    similarity_threshold: 0.2
    enable_reranker: true
    reranker_mode: monolingual
  precise_english_query:
    command: query
    model_name: "FremyCompany/BioLORD-2023-M"
    similarity_threshold: 0.5
    num_results: 5
    enable_reranker: true
    rerank_count: 20

CLI Invocation:
phentrieve text process --profile high_recall_german --input-file clinical_note.txt
phentrieve query --profile precise_english_query --text "patient shows..."
Acceptance Criteria:
A new --profile <profile_name> option is added to relevant CLI commands (initially query and text process).
Phentrieve loads profiles from phentrieve.yaml.
Options specified in the profile are used as defaults for the command.
Command-line arguments explicitly provided by the user override profile settings.
If a profile specifies a command, the --profile option should ideally only be accepted by that command (or an error/warning issued).
Clear error message if a specified profile is not found.
Documentation is updated to explain how to define and use profiles.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions