pyfcstm.llm.fbmcq

Public API for the packaged FBMCQ language guide resource.

get_fbmcq_language_guide_prompt_for_llm

pyfcstm.llm.fbmcq.get_fbmcq_language_guide_prompt_for_llm(raise_on_integrity_error: bool = True) str[source]

Return the packaged FBMCQ language guide prompt.

Parameters:

raise_on_integrity_error (bool, optional) – Whether a missing, malformed, or mismatched checksum should raise instead of returning text with a warning, defaults to True.

Returns:

UTF-8 decoded FBMCQ Markdown prompt with LF newlines.

Return type:

str

Raises:
  • FileNotFoundError – If the packaged Markdown resource is missing.

  • UnicodeDecodeError – If a resource is not valid UTF-8.

  • GrammarGuidePromptIntegrityError – If checksum verification fails.

Example:

>>> get_fbmcq_language_guide_prompt_for_llm().startswith("# FBMCQ")
True

get_fbmcq_language_guide_prompt_path_for_llm

pyfcstm.llm.fbmcq.get_fbmcq_language_guide_prompt_path_for_llm(raise_on_integrity_error: bool = True) str[source]

Return the filesystem path to the packaged FBMCQ language guide prompt.

Parameters:

raise_on_integrity_error (bool, optional) – Whether checksum failures raise, defaults to True.

Returns:

Filesystem path to fbmcq_language_guide.md.

Return type:

str

Raises:

Example:

>>> get_fbmcq_language_guide_prompt_path_for_llm().endswith("fbmcq_language_guide.md")
True

get_fbmcq_language_guide_prompt_metadata_for_llm

pyfcstm.llm.fbmcq.get_fbmcq_language_guide_prompt_metadata_for_llm(raise_on_integrity_error: bool = True) Dict[str, str | int][source]

Return deterministic metadata for the packaged FBMCQ language guide.

Parameters:

raise_on_integrity_error (bool, optional) – Whether checksum failures raise, defaults to True.

Returns:

Resource metadata for experiment snapshots.

Return type:

Dict[str, Union[str, int]]

Raises:
  • FileNotFoundError – If the packaged Markdown resource is missing.

  • UnicodeDecodeError – If a resource is not valid UTF-8.

  • GrammarGuidePromptIntegrityError – If checksum verification fails.

Example:

>>> get_fbmcq_language_guide_prompt_metadata_for_llm()["resource_name"]
'fbmcq_language_guide.md'