makandra dev

Hybrid search runs a vector query and a keyword query in parallel against the same documents and merges the two...

makandra dev

Getting parseable output back from an LLM has two halves: shaping the request, then parsing the response. Even with Ollama...

RAG is often equated with vector databases, embeddings, and semantic search. But RAG ("Retrieval-Augmented Generation") really is just 'put...

When an LLM is part of a request, you want to keep track of how much of the runtime was...

Rails offers several ways to remove records. They differ in whether they instantiate records, fire callbacks (including dependent: associations) and...

Below is a strict, but still workable Content Security Policy for your Ruby on Rails project. Use this CSP if...

api.rubyonrails.org

When working with file uploads, we sometimes need to process intrinsic properties like the page count or page dimensions of...

I recently encountered this error as I was trying to build assets: $ node esbuild.config.js .../node_modules/esbuild-plugin-browserslist/dist/resolveToEsbuildTarget.js:43 throw new Error('Could...

makandra dev

Postgres supports multiple built-in range datatypes: int4range int8range numrange tsrange (range with timestamp without timezone) tstzrange (range with timestamp...

TypeScript basically uses structural typing, which is conceptually quite similar to duck typing, but with static compile-time type checking...

Leaving old unused DB columns around after a migration is confusing for other developers. However, dropping columns too eagerly might...

I use the Gemini web chat interface quite extensively. One thing that is tedious is giving it all the context...

Event listeners are called in the order of their registration: button.addEventListener('click', () => console.log("I run first")) button.addEventListener('click', () => console.log("I...

I have a form with a dynamic number of fields. Submitting it worked fine until I tried out a very...

The :test adapter doesn't respect limits_concurrency configuration. Switch to :solid_queue adapter in your test to verify blocking...

Sometimes you have a maintenance script where you want to iterate over all ActiveRecord models. Rails provides this out of...

When creating a database table for a join model without further importance, you can use Rails' create_join_table:

It's not possible to use variables in media queries with plain CSS. @media (max-width: var(--some-pixel-size...

When you query the browser for DOM elements, there are some footguns you should know about. Some lists are synchronized...

You want to prevent input to a form field, but all the solutions have side effects: The [readonly] attribute is...

Most of the time, it's a good default to add a unique index on the foreign key when using...

Enable local logging for Sentry when: Debugging Sentry event capture locally Testing error handling without polluting production metrics Developing background...

Full-text search can reach its limits in terms of flexibility and performance. In such cases, trigram indexes (pg_trgm...

unpoly.com

Quick guide for frequently used compiler selector patterns of Unpoly. 1. BEM Component Pattern When: Reusable UI components with multiple...