Sunday, November 22, 2026

AI Engineering Data strategy reference list

Data Strategy for Training a Customer Support Foundation Model

This brief describes the data, objective, starting point, and trade-offs for the three main training phases: pre-training, supervised fine-tuning (SFT), and preference fine-tuning.

1. Pre-training

  • Data format: Large collections of text documents, tokenized and arranged into sequences. The text usually does not need question-and-answer labels.
  • Data source: A licensed text corpus combined with the software company’s public product documentation and help articles.
  • Objective: The model learns to predict the next token, building general language ability and knowledge.
  • Starting point: Randomly initialized model weights, with the model architecture already defined.
  • Risk if skipped: The model would lack broad language fluency and the general knowledge needed to understand varied customer questions.

2. Supervised Fine-Tuning (SFT)

  • Data format: Labeled examples, often multi-turn chat records with roles such as user and assistant, showing a question and a suitable support response.
  • Data source: Historical support conversations reviewed, anonymized, and curated by the company’s support team.
  • Objective: The model learns to follow support instructions and produce useful answers in the expected style and format.
  • Starting point: The pre-trained base model.
  • Risk if skipped: The model may understand language but struggle to follow instructions or handle support conversations consistently.

3. Preference Fine-Tuning

  • Data format: Comparisons between responses to the same prompt—for example, a preferred answer and a less helpful answer—with preference labels or rankings.
  • Data source: Support specialists compare candidate answers using criteria such as accuracy, clarity, tone, and whether the answer should escalate to a human.
  • Objective: The model learns which of several plausible responses people prefer.
  • Starting point: The SFT model.
  • Risk if skipped: Responses may be less helpful, clear, or appropriately cautious, even when they are relevant and well-formed.

Bonus: Which Phase Would Save the Least Compute to Skip?

Preference fine-tuning would typically save the least compute if skipped. It usually requires fewer training steps and less data than pre-training, which is generally the most compute-intensive phase.

It can still be worth keeping because it helps the assistant choose more helpful, clear, and appropriate responses among answers it already knows how to produce. Human review and annotation may also take time and money, even when the training compute is modest.

Data Handling Note

Before using support conversations for training, remove or mask personal and sensitive customer details, and confirm that the company has the rights and approvals needed to use the data.

Tuesday, March 16, 2021

Invalid ELF Header

https://www.freecodecamp.org/news/escaping-lambda-function-hell-using-docker-40b187ec1e48/ Apparently I have to do npm install and serverless deploy in a docker running a linux which is as close as possible to the machine running in AWS.

Tuesday, November 24, 2020

Interesting day - what to do if docker registry fails with timeout.

So today was interestingly frustating...

I've setup my Mac in order to use brew for mostly everything because I like installing stuff from terminal. ( Definetly this is a personal issue from the days I had to install and reinstall my Windows machine ).

Now I did my development setup to support a backend oriented programmer because that's what I do in my professional life. With this in mind I wanted to dive into writing a lambda in node because I will use that know how for work.

So after a few "brew installs" which went ahead without a hitch I started :

- sam init

- sam build

- sam local invoke ScheduledEventLogger --event events/event-cloudwatch-event.json

Yes, I used the setup sam can create for you - I did say I was testing stuff out.

And then this happened : "docker: Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:50524->10.0.2.3:53: i/o timeout."

Of course at this stage I popped up google search and start reading stackoverflow... So I tried a bunch of the things that were suggested - not a happy result in sight was to be seen. So then I've given up and said to myself that I need to get on the "tried and true" solution: uninstall and reinstall - but happiness was not in sight. And then I got onto : https://forums.docker.com/t/pulling-docker-images-i-o-timeout/740/6

So turned off and on my Wifi and "voila"

Friday, August 21, 2020

Still here - still coding

There is a question which HR loves to ask when interviewing a candidate : " Where do you see yourself in 5 years?" My answer: " I want to do this stuff even at 80... so the best things are in between" Not always loving HR but seeing the faces when they hear the answer makes me giggle. Also staying sane enough to be doing this job is a job of its own. Not losing your mind when every year there is a manager that wants a fully featured task in 2 weeks even if the whole team estimated it at 2 months, is again a job of its own. Not to mention the rate at which new stuff appears that may or may not be good in the long run - but one still has to learn it 'cause you never know.

Tuesday, April 7, 2015

Stuff from rails trenches

Routes resources and resource are 2 different things.

POST to a url with basic authentication and 301 response without follow through.

require 'rest-client' $result = '' RestClient.post('https://username:password@localhost:3000/', {} ) do |response, request, result| $result = result["Location"] end puts $result It took some digging but it's nice and short. Happy thoughts.

Friday, September 17, 2010

I was at: Unit Testing Training


I've been trying to improve my skills in direction of software craftsmanship.

First thing's first : the difference between mocks and stubs is now clear.
When do i use stubs and with what intent - talking about code review ( unit tests are code as important as production code towards the value added paradigm).

When do I use mocks and most important at what stage of the development process could one insist on using mocks.

Ideas are a great thing so now I can say that reading about this subject and doing this training gives a much clear picture how to do it (crafts). It's still fuzzy but I'm confident i'm getting there one step at a time.