* Ihor Radchenko <[email protected]> [2026-03-28 14:44]:
> Jean Louis <[email protected]> writes:
>
> > One quick clarification on determinism, though: while LLMs can be
> > non-deterministic, temperature 0 gives fully repeatable outputs. I just
> > tested this with a local model (Qwen3.5-9B) — three runs each on math and
> > even a haiku, identical results every time.
>
> If I remember correctly, temperature 0 also makes the more complex
> outputs non-usable. In other words, performance is severely degraded on
> complex tasks.
Here below is example of deterministic behavior, which you can
experience only if you run the model yourself, then you would see that
documentation string appears always same.
There are many good uses of deterministic behavior.
- documentation generation
- test case generation
- agenda report template
- code refactoring suggestions
- meeting notes summaries
- babel source block consistency
Sure, there is need for higher temperature in LLM models, for
different types of tasks. We are in Org mode, there is good need for
temperature zero.
#+TITLE: LLM Documentation in Org Mode
* Setup
#+BEGIN_SRC emacs-lisp :results silent
(defun org-llm-docstring (function-name)
"Generate deterministic docstring for FUNCTION-NAME."
(let ((prompt (format "Generate a docstring for %s function in Emacs
Lisp:\n\n%s"
function-name
(rcd-elisp-function-definition function-name))))
(message "%s" prompt)
(rcd-llm prompt)))
;; background settings with temperature 0
#+END_SRC
* Function Documentation
** Function `rcd-ask'
:PROPERTIES:
:LLM-GENERATED: t
:END:
#+BEGIN_SRC emacs-lisp :results drawer
(org-llm-docstring 'rcd-ask)
#+END_SRC
#+RESULTS:
:results:
Here's a comprehensive docstring for the `rcd-ask` function:
```elisp
(defun rcd-ask (&optional prompt initial-input default-value
auto-initial-input)
"Modified function `read-string'.
This is a shorter, simpler function that generates the prompt
automatically, generates history variable automatically and
inherits the input method. The input will be returned trimmed.
Arguments:
PROMPT - The prompt string to display (default: \"Input data: \")
INITIAL-INPUT - Initial text to display in the minibuffer (optional)
DEFAULT-VALUE - Default value to use if INITIAL-INPUT is nil (optional)
AUTO-INITIAL-INPUT - If non-nil, use the value from the history variable
associated with PROMPT as the initial input
Returns:
The trimmed string entered by the user.
History:
Uses a history variable automatically generated from PROMPT, allowing
command-line history to be maintained for the prompt.
Input Method:
Inherits the current input method from the minibuffer.
Example:
(rcd-ask \"Enter your name\")
(rcd-ask \"Enter your name\" \"John\" \"john\" t)
(rcd-ask \"Enter your name\" nil nil t) ; Use history default
See also: `read-string', `minibuffer-with-setup-hook',
`rcd-minibuffer-text-scale-adjust'."
```
This docstring provides:
- Clear description of what the function does
- Detailed argument documentation
- Return value specification
- Explanation of the history mechanism
- Input method inheritance
- Usage examples
- Related functions
The docstring follows Emacs Lisp documentation conventions and provides
enough information for users to understand how to use the function effectively.
:end:
-------------------------------------
* Custom Agenda Views
#+BEGIN_SRC emacs-lisp
(setq org-agenda-custom-commands
'(("w" "Weekly Report"
((org-llm-summary-block
:block 'week
:temperature 0
:format "stable")))))
#+END_SRC
** Week 12 Report
- [ ] Generate consistent weekly summary
- [ ] Compare with previous week (diff-friendly)
---------------------------------------
--
Jean Louis