Skip to content

Instantly share code, notes, and snippets.

View hocyadav's full-sized avatar
😌
Working from home

Hariom Yadav hocyadav

😌
Working from home
View GitHub Profile
@hocyadav
hocyadav / README.md
Created December 11, 2024 17:52 — forked from disler/README.md
Use Meta Prompting to rapidly generate results in the GenAI Age

Meta Prompting

In the Generative AI Age your ability to generate prompts is your ability to generate results.

Guide

Claude 3.5 Sonnet and o1 series models are recommended for meta prompting.

Replace {{user-input}} with your own input to generate prompts.

Use mp_*.txt as example user-inputs to see how to generate high quality prompts.

Your thinking is mostly correct. Here are some popular examples and their approaches:

  1. Google Search:

    • Approach: Semantic Search
    • Explanation: Uses natural language processing to understand the meaning of the query and find relevant documents, even if they don't contain the exact keywords.
    • Vector Database: Yes
  2. Google Image Search:

    • Approach: Similarity Search
  • Explanation: Finds images similar to the query image by comparing vector representations of images.

You:

I want to do small local spring boot poc on spring ai in Java gradle, I want to use database as some popular vector db, assume local LLM mode ollama l is running mistral, show me all code for how to connect to vector database that is running locally and also tell me what gradle dependency I need to add in spring boot project to connect to db

ChatGPT:

To create a Spring Boot project with Gradle that connects to a vector database (we'll use Pinecone as an example), and assumes a local LLM mode ollama l is running mistral, follow these steps:

Step 1: Set Up Spring Boot Project with Gradle

  • test

In the rapidly evolving world of financial technology, ensuring secure and seamless access to services remains a paramount challenge. Traditional authentication methods, heavily reliant on passwords and personal identifiers, no longer suffice in the face of sophisticated threats. Herein lies the potential for blockchain technology to redefine the paradigm of financial security.

Our hackathon project proposes a cutting-edge solution: a blockchain-based authentication framework designed to fortify financial transactions and access control. By leveraging the inherent security properties of blockchain—such as decentralization, immutability, and cryptographic verification—we aim to establish a new standard for authenticating user identities and transactions in the fintech sector.

  • slide 1: ✅
    • Comparing traditional databases, like SQL and NoSQL, with blockchain databases. -with each row representing an entity or record.
      • In traditional databases, an entity is a row in a table, capable of CRUD operations - Create, Read, Update, Delete.
      • Blockchain treats transactions as rows, but typically only allows Create and Read operations, making data immutable.
        • blockchain database, where each transaction is a record added to a growing list called a ledger.
    • transactions are verified in blockchain through consensus and are secured with cryptographic signatures, unlike traditional databases.
    • each transaction in a blockchain has metadata like timestamp and is linked to previous transactions, forming an immutable ledger
  • slide 2: ✅
    • centralized system, like a traditional company database, where one entity has control over all the data.
// migrations/2_deploy_contracts.js
const IdentityVerification = artifacts.require("IdentityVerification"); // contracts/IdentityVerification.sol
module.exports = function (deployer) {
deployer.deploy(IdentityVerification);
};
@hocyadav
hocyadav / MyBlockingQueue.java
Created December 27, 2023 09:59
prodcuer consumer pattern using own blocking queue
import lombok.SneakyThrows;
import java.util.LinkedList;
import java.util.Queue;
/**
* @author Hariom Yadav
* @since 05-Dec-2023
*/
public class MyBlockingQueue {