Posts

Showing posts with the label LLM

How to create a local RAG-enabled LLM server that provides safe access to your documents

Image
This tutorial explains how to set up a headless RAG-enabled large language model (LLM) on an Ubuntu server. By the end, you will be able to chat with your LLM running locally on your own infrastructure. Your conversations will not be sent to third-party servers, ensuring that your prompts, responses, and any uploaded files remain private and under your control. A quick word on security Effective network security begins with a strong perimeter defence. One of the most critical steps is configuring a firewall on your router and hosts to explicitly deny all unsolicited inbound traffic from the internet. This “default deny” posture ensures that no internal services are accidentally exposed, creating a controlled environment where all communication is initiated from within your trusted network. A common and potentially dangerous misconception is that Network Address Translation (NAT) alone provides sufficient security. While NAT obscures internal devices, it is a routing mechanism rather...

AI Prompt Engineering - Use Code not Words

Image
AI language models don’t actually reason in a human sense. For those interested in how these systems are trained, I recommend checking out Demystifying LLMs with Andrej Karpathy .   The Token Challenge When processing text, language models work with “tokens” rather than complete words. The relationship between words and tokens isn’t always one-to-one. For instance, the term “LLM” gets split into two separate tokens in the paragraph below. Similarly, longer or unusual strings can be divided into numerous tokens. The word “ SuperCaliFragilisticExpialiDociouc ” is broken down by GPT-4o into 11 distinct tokens. It’s important to understand that AI responses are generated probabilistically, one token at a time, with deliberate randomness incorporated. This explains why asking the same question multiple times often yields different answers. These fundamental characteristics create significant constraints when AI attempts text analysis tasks. For example, until recently, many langu...

Demystifying LLMs with Andrej Karpathy

Image
The emergence of Large Language Models (LLMs) represents a pivotal advancement in artificial intelligence, transforming multiple industries. Andrej Karpathy’s presentation, “ Deep Dive into LLMs like ChatGPT ”, offers an accessible yet comprehensive exploration of these models. As former Director of AI at Tesla and a founding member of OpenAI, Karpathy breaks down complex concepts for audiences regardless of technical background.  While most generative AI training focuses on prompt engineering to generate specific content, this only scratches the surface of how LLMs truly function.  Core LLM Development Process  LLMs are developed through several critical stages:  Data Acquisition and Preparation : Models are trained on massive datasets collected from internet sources. This extensive collection enables the LLM to learn statistical patterns in human language.  Data Cleaning : Internet-sourced data contains significant noise—duplicates, spam, and low-qual...

AI Got It Wrong - News

Image
We consulted six AI engines to obtain a news-related statistic covering a 12-month period on the success rate of SpaceX Starship missions from April 2024 to March 2025. The specific question posed was: " What is the success rate of SpaceX Starship rockets over a 12-month period from April 2024 to March 2025? " The test was conducted on March 10, 2025. Notably, on March 6, 2025, SpaceX experienced an explosion. The objective of this test was to evaluate the following capabilities of the AI engines: Temporal Awareness: Can the AI engines recognise that the end date in the query extends into the future? Retrieval-Augmented Generation (RAG): Are the AI engines capable of supplementing their pre-existing training data with dynamically sourced information? Large language models (LLMs) are trained using datasets, often sourced from online content, but at a certain point, training is frozen. As a result, some AI engines may not have recorded the March 6 event in their databases. Do ...