new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

FastAPI · all subjects

documentation

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

LLM-guided translation process for FastAPI docs

FastAPI documentation translations are created by LLMs guided with prompts designed by the FastAPI team together with the community of native speakers for each supported language.

Language-specific LLM prompts location

Each language has a directory in the docs folder at https://github.com/fastapi/fastapi/tree/master/docs. Within each language directory, there is a file named llm-prompt.md containing the prompt specific to that language. For example, the Spanish prompt is located at docs/es/llm-prompt.md.

How to request translation improvements

If you find translation mistakes in your language, you can make suggestions to the language-specific llm-prompt.md file and request that specific pages be re-generated after the changes. Pull requests with suggestions to language-specific LLM prompts require approval from at least one native speaker.

Steps to request a new language translation

To request translations for a new language: First, find at least 2 other people willing to review translation PRs for that language alongside you (3 people total minimum). Once you have at least 3 committed people, create a new discussion following the template and tag the other 2 people to confirm they will help. Once several people are involved in the discussion, the FastAPI team evaluates it and can make it an official translation. The docs will then be automatically translated using LLMs, and the team of native speakers can review and help tweak the prompts.

Ongoing translation maintenance process

Once a new language translation is established, when docs are updated or new sections are added, a comment will be posted in the same discussion with a link to the new translation for review.

Form feed character in docstring to limit OpenAPI description

Adding a backslash-f (\f) character, which represents a masked form feed character, in a path operation function's docstring causes FastAPI to truncate the OpenAPI output at that point. The content after \f is not displayed in the documentation but can be used by other tools like Sphinx.

Give your agent this brain