Wiki › Component

Question log (ask.chaipat.cc)

Component

The question log, api/log.js, is a small serverless function on Vercel that stores the questions visitors type, so questions the site answers badly can be found and fixed.

Each entry keeps the question's text, how it was understood, where the answer came from, whether anything was found and the top result, whether a model was asked and what came of it (a column that reads off while the model fallback is switched off, as it is by default), plus the device type, language and an answer id that votes on the answer refer to. No IP address is stored; the address is used only to rate-limit requests. The data goes to PostgreSQL on Neon, over its HTTP interface, with no database driver. He reads it in an admin that runs only on his own machine and is never deployed: the most-asked questions, the unanswered ones (and whether the site can answer them now), the answers voted down and the reasons given, and the messages from the Mail page. The browser tests never log.

In the knowledge graph

Question log and the 4 things it is linked to. Open any dot for its page, or explore it in the full graph.

As data

Everything on this page is read from triples in the knowledge graph. These are the 11 it states about Question log, and 2 more its ontology implies; the console runs SPARQL over the whole graph, here in your browser.

Download
@prefix id: <https://ask.chaipat.cc/id/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix cj: <https://ask.chaipat.cc/ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

id:SiteQuestionLog
    a cj:Component ;
    rdfs:label "Question log (ask.chaipat.cc)" ;
    cj:shortLabel "Question log" ;
    cj:componentOf id:ThisSite ;
    cj:sourceFile "api/log.js" ;
    cj:integrates id:Neon ;
    cj:uses id:PostgreSQL , id:Vercel ;
    cj:description "Stores the questions visitors type (text only, no IP address) in Postgres, with votes on answers, so questions the site answers badly can be found; a private stats page reads it." ;
    cj:article "https://ask.chaipat.cc/wiki/SiteQuestionLog"^^xsd:anyURI ;
    cj:implementationDigest "sha256:ec86cd3352bc3bb20e39307548b4f7b43a6ebbc07bbb07af5e25658d7aae2767" .