answer seems to relate only to the system prompt, not to the actual prompt (user) #301

Open
opened 2026-02-15 16:29:46 -05:00 by yindo · 1 comment
Owner

Originally created by @gg4u on GitHub (Sep 24, 2025).

I don't understand what I am doing wrong, but it seems answer relates only to the System prompt, ignoring to actual prompt.

Can you help?

def get_completion(prompt: str, system_prompt="", prefill=""):
    response = chat(
        model=MODEL_NAME,
        options=Options(
            max_tokens=2000,
            temperature=0.0,
            num_ctx=8192, # I put context large enough for the txt file.
        ),
        messages=[
            {"role": "system", "content": system_prompt},  
            {"role": "user", "content": prompt},
            {"role": "assistant", "content": prefill}
            
        ],
        #think = True
        #format=ValueList.model_json_schema(),
    )
    return response.message.content

PROMPT = textwrap.dedent(f"""\

Input:
- Read the below <paper> and [prime the focus of the task].
- Pull the most relevant quotes into <scratchpad> tags, as evidences supporting the argument.

<paper>
    {content_doc} # here I inject the text from a large txt file
</paper>


Task:
- Answer the following <questions>, writing the answer for each in an <answer> tag.

<questions>
    <question>
        [..]. # sets of questions
    </question>

""")

SYSTEM_PROMPT = textwrap.dedent(f"""
You are a [Role] who [description of actions should take].
""")

PREFILL = ''


Answer:

I'd be happy to help analyze an argument. Please provide the text of [...].

Once I have the text, I'll proceed with the analysis.

Originally created by @gg4u on GitHub (Sep 24, 2025). I don't understand what I am doing wrong, but it seems answer relates only to the System prompt, ignoring to actual prompt. Can you help? ``` def get_completion(prompt: str, system_prompt="", prefill=""): response = chat( model=MODEL_NAME, options=Options( max_tokens=2000, temperature=0.0, num_ctx=8192, # I put context large enough for the txt file. ), messages=[ {"role": "system", "content": system_prompt}, {"role": "user", "content": prompt}, {"role": "assistant", "content": prefill} ], #think = True #format=ValueList.model_json_schema(), ) return response.message.content ``` PROMPT = textwrap.dedent(f"""\ Input: - Read the below <paper> and [prime the focus of the task]. - Pull the most relevant quotes into <scratchpad> tags, as evidences supporting the argument. <paper> {content_doc} # here I inject the text from a large txt file </paper> Task: - Answer the following <questions>, writing the answer for each in an <answer> tag. <questions> <question> [..]. # sets of questions </question> """) SYSTEM_PROMPT = textwrap.dedent(f"""\ You are a [Role] who [description of actions should take]. """) PREFILL = '' ``` Answer: ``` I'd be happy to help analyze an argument. Please provide the text of [...]. Once I have the text, I'll proceed with the analysis. ```
Author
Owner

@ParthSareen commented on GitHub (Oct 2, 2025):

what model are you using? have you tried asking it just a question without the text file? it still might be the case that there is some shifting behavior which causes the drop although i'd expect the opposite where the system prompt is ignored

@ParthSareen commented on GitHub (Oct 2, 2025): what model are you using? have you tried asking it just a question without the text file? it still might be the case that there is some shifting behavior which causes the drop although i'd expect the opposite where the system prompt is ignored
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#301