AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How to Configure Custom Instructions and Control Sampling in HuggingChat

Lars-Marten Prell · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

If you are looking for a simple temperature slider or a repetition penalty knob in the main settings of HuggingChat, stop searching. You will not find one.

Hugging Face designed its hosted web interface at HuggingChat for streamlined consumer chat. It deliberately hides low-level decoding hyperparameters from the standard interface. That design choice keeps things uncluttered for casual conversations, but it frustrates users trying to fix robotic verbosity, erratic hallucinations, or endless text loops.

At 365Finds, we believe in dealing with software as it actually exists, not as marketing descriptions suggest. While you cannot adjust raw generation sliders in the hosted chat window, you have two practical paths forward: creating a Custom Assistant to control system prompts and output constraints, or self-hosting chat-ui where every sampling parameter—from temperature to repetition_penalty—is fully exposed in code.


Method 1: Taming Output Style with Custom Assistants

On the public HuggingChat web application, the most reliable mechanism to shape model behavior is the Assistants builder. This is where you configure persistent system instructions (often referred to in the codebase as the preprompt).

Step-by-Step Setup

  1. Open Assistants: In the left-hand navigation sidebar of HuggingChat, click on Assistants, or navigate directly to huggingface.co/chat/assistants.
  2. Create New Assistant: Click the Create new assistant button.
  3. Choose the Base Model: Select an underlying open-source model (such as Llama 3.3 70B, Mistral, or Qwen). At 365Finds, we strongly recommend opting for larger parameter models (70B class) when style adherence and repetition control matter, as smaller models derail more frequently.
  4. Define Your System Instructions: In the Instructions (System Prompt) field, write explicit stylistic rules and negative constraints.
You are a precise, technical assistant. 
Style Rules:
- Answer directly without conversational filler or introductory throat-clearing.
- Use concise bullet points where appropriate.
- Conclude immediately when the requested solution is delivered.

Anti-Repetition Constraints:
- Do not restate the user prompt.
- Do not repeat previously established definitions or summaries within the same answer.
- If a point has been stated once, move forward.
  1. Activate the Assistant: Name the assistant, add an optional avatar and description, and click Create. All conversations initiated through this Assistant will now inherit your behavioral guardrails.

Why HuggingChat Models Fall Into Repetition Loops

Even with strong prompts, open-weight models occasionally enter dreaded generative loops, repeating a single sentence or formatting fragment until hitting the maximum token ceiling.

Through our testing at 365Finds, three primary factors trigger this behavior:

Root CauseTechnical MechanismReal-World Symptom
EOS Token MisalignmentThe model fails to trigger the designated end-of-sequence token according to its chat template.The response answers your prompt, then keeps rambling or looping filler text until truncated.
Context Window SaturationWhen conversations become lengthy, earlier context drops out or fills up the buffer.The model loses its thread and begins echoing phrases from its immediate previous turns.
Greedy Sampling TrapsWithout sampling noise or token penalties, top-probability tokens form a self-reinforcing feedback loop.Identical paragraphs or lists regenerate continuously.

Practical Workarounds on Hosted HuggingChat

When an assistant or standard chat thread begins repeating itself:


Method 2: Self-Hosting chat-ui for True Parameter Control

If your workflow requires strict mathematical control over output variance and token suppression, the public hosted interface is simply the wrong environment. You need to deploy Hugging Face's open-source repository, chat-ui.

In a self-hosted chat-ui instance, sampling parameters are not hidden. They are explicitly defined in your .env.local configuration within the MODELS JSON block.

[
  {
    "name": "meta-llama/Llama-3.3-70B-Instruct",
    "displayName": "Llama 3.3 70B",
    "parameters": {
      "temperature": 0.3,
      "top_p": 0.95,
      "repetition_penalty": 1.2,
      "top_k": 50,
      "max_new_tokens": 2048,
      "truncate": 8192
    }
  }
]

Tuning Recommendations from 365Finds


The 365Finds Verdict

HuggingChat offers one of the best free windows into cutting-edge open-source AI, but it is not a developer playground.

If you are using the public website, stop looking for temperature sliders. Build an Assistant, write tight negative instructions into the preprompt, and switch to a 70B-tier model when repetition strikes. If you need granular decoding parameters, clone chat-ui and run your own backend. Recognizing which tool matches your technical requirements saves hours of frustration.

References