Skip to content

Instantly share code, notes, and snippets.

View dsartori's full-sized avatar
🚩

dsartori

🚩
View GitHub Profile
@dsartori
dsartori / System.md
Created July 28, 2025 11:21
Qwen OpenWebUI system prompt

You are a helpful and harmless assistant. You should think step-by-step and make careful use of the tools available to you. You can use tools during the reasoning step.

Some tools require chaining for optimal use, for example using tool_search_post to retrieve Wikipedia article titles and curid values to use with tool_readArticle_post for article retrieval. Large articles will overwhelm context, so try using a summary or facts tool first.

Use a similar pattern for web searches with DuckDuckGo - the results of tool_web_search_post can be used to get the URL contents with tool_fetch_url_post. You can also use the latter tool to examine URLs provided by the user and fetch the contents into context.

NEVER call more than one tool at once. You must call each tool individually and consider the new data before proceeding. This is a critical directive- the session will crash if you fail to comply.

Today's date is {{CURRENT_DATE}}. Your user is {{USER_NAME}},

@dsartori
dsartori / chat-MOH.txt
Created December 30, 2024 21:59
A sample interaction with a RAG chatbot loaded with Ministry of Health data.
### USER
What is the overall structure of the health ministry?
### ASSISTANT
The overall structure of the health ministry includes various roles and positions such as the Deputy Minister, Assistant Deputy Ministers, Associate Assistant Deputy Ministers, Director Generals, Executive Directors, and other key branches like the Health Policy Branch, Policy Coordination and Planning Directorate, Indigenous, Federal, Provincial, and Territorial Relations Directorate, Mental Health and Substance Use Directorate, Office of Pharmaceutical Management Strategies, and Pandemic Preparedness Coordination Directorate. These positions are responsible for managing various aspects including policy coordination, planning, Canada Health Act divisions, and federal-provincial/territorial relations in health care policy.
The Deputy Minister reports directly to the Minister of Health and is appointed by the governor in council, overseeing day-to-day operations and strategic priorities of the department. The Minister of Health hold
@dsartori
dsartori / rag_prompt.txt
Last active December 31, 2024 04:08
System prompt for process-briefings
You are an expert assistant trained to retrieve and generate detailed information **only** from a curated dataset. Your primary goal is to answer natural-language queries accurately and concisely by extracting and synthesizing information explicitly available in the dataset. You are prohibited from making assumptions, inferences, or providing information that cannot be directly traced back to the dataset. The topics you specialize in are:
- policies and priorities
- organizational structure
- programs and operations
- key partnerships
- challenges
- history and legislation
@dsartori
dsartori / chat.md
Created November 27, 2024 03:43
qwen2.5-coder3B + RAG

USER

I want to serialize table data as an XML string to pass to a stored procedure. How can I do this with T-SQL?

ASSISTANT

To serialize table data as an XML string and pass it to a stored procedure using T-SQL, you can use the FOR XML clause in SQL Server. This clause allows you to convert query results into XML format.

Here's how you can do it:

  1. Use the FOR XML AUTO option to generate XML with elements representing each row and columns as attributes.
  2. Specify the desired output type (e.g., Elements, Columns) to customize the structure of the XML.
@dsartori
dsartori / mssql-docker-compose.yml
Created April 25, 2024 17:38 — forked from jjuanrivvera99/mssql-docker-compose.yml
SQL Server with Docker Compose
version: '3.3'
services:
mssql:
container_name: sql-server
image: mcr.microsoft.com/mssql/server:2017-latest
#image: mcr.microsoft.com/mssql/server:2017-CU11-ubuntu
restart: always
environment:
ACCEPT_EULA: "Y"
[
{"geo":"Newfoundland and Labrador",
"46,605 or less":{
"percent of tax":14.04,
"percent of population":69.41},
"46,605 - 93,208":{
"percent of tax":38.32,
"percent of population":23.07},
"93,208 - 144,489":{
"percent of tax":20.65,
DROP TABLE IF EXISTS #VotesCast
SELECT
e.ECNumber,
e.EcNameEn,
SUM(CASE WHEN e.electionyear = 2015 THEN pr.votes ELSE 0 END) AS Votes2015,
SUM(CASE WHEN e.electionyear = 2019 THEN pr.votes ELSE 0 END) AS Votes2019,
SUM(CASE WHEN e.electionyear = 2021 THEN pr.votes ELSE 0 END) AS Votes2021
INTO #VotesCast
FROM pollresult pr