Skip to content

Conversation

@chr156r33n
Copy link
Contributor

@chr156r33n chr156r33n commented Jun 21, 2025

Added llms-txt-valid for custom metrics - wasn't sure of where best to include, so created a new file.

Adding the following:

Fetches /llms.txt and returns a simple validity flag (1 or 0). It checks that the response:

  • Succeeds (HTTP 2xx)
  • Has a Content-Type of text/plain
  • Contains balanced Markdown code fences (…)
  • Has matching counts of [ vs. ] and ( vs. )

If any check fails, it returns 0; otherwise it returns 1.

Expected test results:

https://llmstxt.org/llms.txt - Should pass "llms-txt-valid": 1
https://www.twitch.tv/llms.txt - Should fail, incorrect mime type "llms-txt-valid": 0
https://www.chris-green.net/llms.txt - Should fail, 404 "llms-txt-valid": 0
https://rgarttherapy.co.uk/llms.txt - Invalid file "llms-txt-valid": 0


Test websites:

Fetches /llms.txt and returns a simple validity flag (1 or 0). It checks that the response:

- Succeeds (HTTP 2xx)
- Has a Content-Type of text/plain
- Contains balanced Markdown code fences (…)
- Has matching counts of [ vs. ] and ( vs. )

If any check fails, it returns 0; otherwise it returns 1.
tunetheweb and others added 5 commits June 21, 2025 21:34
Making LLMs.txt scoring less strict, so present - yet malformed llms.txt files - will always be marked as "valid", rather than invalid to make it easier to count total adoption whilst understanding which files have errors or not.
@github-actions
Copy link

https://almanac.httparchive.org/en/2022/

WPT result details

Changed custom metrics values:

{
  "_llms_txt_validation": {
    "valid": false,
    "message": 404,
    "error": "Non OK status code"
  }
}
https://llmstxt.org

WPT result details

Changed custom metrics values:

{
  "_llms_txt_validation": {
    "valid": true
  }
}
https://www.twitch.tv

WPT result details

Changed custom metrics values:

{
  "_llms_txt_validation": {
    "valid": false,
    "message": "text/html",
    "error": "Invalid content type"
  }
}
https://www.chris-green.net

WPT result details

Changed custom metrics values:

{
  "_llms_txt_validation": {
    "valid": false,
    "message": 404,
    "error": "Non OK status code"
  }
}
https://rgarttherapy.co.uk

WPT result details

Changed custom metrics values:

{
  "_llms_txt_validation": {
    "valid": true,
    "error": "Invalid markdown: Unmatched braces"
  }
}

@tunetheweb tunetheweb merged commit a4465a5 into HTTPArchive:main Jun 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants