Designed to process documents and generate standardized filenames for both academic/research and non-academic documents under strict formatting and output rules.
50 Pulls Updated 8 weeks ago
Updated 8 weeks ago
8 weeks ago
e8faffeeb27e · 7.1GB
Readme
Modelfile.schollama
This file is a model configuration for a Document Validation and Management Assistant. It is built for ollama @Web and is adaptable to various model sizes including 1b, 3b, 7b, and 8b. The assistant is designed to process documents and generate standardized filenames for both academic/research and non-academic documents under strict formatting and output rules.
Overview
Modelfile.schollama instructs the assistant to:
- Output Valid JSON: Every response is guaranteed to be a JSON object.
- Standardize Filenames:
- Academic/Research Papers: Expected filename format is
"{lastname}_{year}_{seven_word_summary}.pdf"
where:
- lastname
: the first author’s last name, in lowercase (no initials)
- year
: the publication year (YYYY)
- seven_word_summary
: exactly seven key words from the title separated by underscores
Example: smith_2023_neural_networks_improve_medical_image_classification_accuracy.pdf
- Non-Academic Documents: Expected filename format is
"{specific_type}_{date}_{seven_word_summary}.pdf"
where:
- specific_type
: one of the allowed types (assessment, guideline, case_study, progress_note, protocol, evaluation, manual, template, report, training)
- date
: in the YYYYMMDD format
- seven_word_summary
: exactly seven descriptive words separated by underscores
Examples:
assessment_20240219_patient_speech_language_evaluation_initial_session.pdf
guideline_20240219_aphasia_treatment_protocol_for_clinical_implementation.pdf
- Enforce Strict Filename Rules:
- Always output in lowercase.
- Use underscores as the only separator.
- The final filename must never exceed 100 characters.
- The summary must always consist of exactly seven words.
- Always include an
error
field in the JSON response.
File Structure
The file consists of the following major sections:
FROM Clause:
Specifies the base model to use.
Example:FROM mistral:7b
(This can be adapted for 1b, 3b, 7b, or 8b versions as available.)Parameters:
PARAMETER temperature 0.1
PARAMETER top_p 0.1
PARAMETER num_ctx 2048
PARAMETER stop ["</s>", "}", "\n"]
PARAMETER repeat_penalty 1.2
PARAMETER num_predict 512
SYSTEM Prompt:
Contains the detailed instruction set that defines the assistant’s role and enforces the strict JSON output rules along with the required filename formatting guidelines.
Usage Instructions
Environment Setup:
- Ensure your ollama @Web environment is correctly configured.
- Adjust the base model in the
FROM
clause if you prefer using 1b, 3b, 7b, or 8b variants.
Sending Documents:
- Provide a document with either academic or non-academic context.
- The assistant will process the document according to the rules defined in the system prompt and return a JSON response.
Response Format:
- Every output will include:
"document_type"
:"academic"
or the specific type for non-academic documents."metadata"
: An object containing details such as title, authors, year (or date and specific_type)."filename"
: A standardized filename following the strict formatting rules."confidence"
: A float between 0.0 and 1.0."error"
: A string with error details, ornull
if no error occurred.
- Every output will include:
Accessibility & Best Practices
- Consistency: Using JSON ensures that downstream systems can reliably parse and use the response.
- Error Handling: An
error
field is always included so that any deviations or issues in processing are immediately apparent. - Maintainability: The configuration is simple, with parameters clearly defined for temperature, context length, and predict count.
- Adaptability: This file is ready for use with multiple model sizes (1b, 3b, 7b, 8b) based on available resources and deployment needs.
Conclusion
Modelfile.schollama serves as a robust configuration file designed to enforce strict document naming rules and consistent JSON output. Whether you are working with lighter (1b, 3b) or heavier (7b, 8b) models, this configuration is suitable for the ollama @Web environment and supports accessible, maintainable, and efficient document validation workflows.
For further modifications or integration support, please refer to the project’s main documentation or contact the development team.