Shanraq.org Shanraq.org
From a Go blog to an evidence archive
IT

AI Engineer Lesson 1 of 4

From a Go blog to an evidence archive

Build a source collection and discover which information disappears at the blog API boundary.

Can a headline settle a question?

Two index cards read “Game six” and “Game nine.” A reader asks who played Black and how the game ended. Write down which fields are missing. You need a passage to justify the answer and an address where the reader can check it.

Start with a snapshot

Install Git and Go 1.27.4 or later. If you already have the repository, open its course/ai-engineer directory. The program includes two teaching summaries in three languages. It checks quotations against these snapshots. The links lead to the full articles.

git clone --depth 1 https://github.com/DauletBai/shanraq.org.git
cd shanraq.org/course/ai-engineer
go version
go run . -lang en list

Expect two identifiers, game-6 and game-9. Open archive.json and underline the English words that establish the result of game nine. Switch the language to kz. Notice which identifier stays the same and which fields change.

Connect your own blog

Read api.go in step 34 of the Go course. The list includes a title, language and metadata. Inspect the individual article handler in main.go too. Even that response omits body. Apply the small extension to the detail response in your own checkout. From the repository root, run the following commands. The blog requires the Go version in its own go.mod.

git apply --check course/ai-engineer/step34-body.patch
git apply course/ai-engineer/step34-body.patch
cd course/go-blog/step-34
go run .

In another terminal open course/ai-engineer. Run the second command only after a successful import. If the list is empty, check whether the blog contains a post in the selected language.

go run . -blog http://127.0.0.1:8080 import > imported.json
go run . -data imported.json -lang en list

Your turn. Pick one record, follow its URL and match a sentence in body to the article. Submit the identifier, language, address and verified sentence. If the importer reports missing evidence, check which instance of the blog is listening on port 8080.

An index card points to a shelf holding the full document.

Audio (MP3) · Project code

Transcript — A title helps you find an article. Its text provides evidence for an answer. Keep the source address with the passage.

If you have found a mistake or a typo in this article, tell us about it

Comments (0)

No comments yet. Be the first.