| """PALIMPSESTE — Conversation corpus for fluid dialogue. |
| |
| Teaches the model how to CONVERSE, not just answer questions. |
| Categories: |
| 1. Multi-turn dialogues (follow-up questions, topic changes) |
| 2. Creative writing (poems, stories, descriptions) |
| 3. Code generation (write functions, fix bugs, explain code) |
| 4. Summarization (condense text) |
| 5. Instruction following (format, translate, rephrase) |
| 6. Opinions & reasoning (explain why, compare, analyze) |
| """ |
|
|
| CONVERSATION_PAIRS = [ |
| |
| ("that is interesting", "i am glad you find it interesting. would you like to explore it further?"), |
| ("tell me more", "certainly. what specific aspect would you like to know more about?"), |
| ("i did not know that", "it is a fascinating topic. there is always more to learn."), |
| ("can you explain that again", "of course. let me break it down more simply."), |
| ("i see", "does that make sense? feel free to ask if anything is unclear."), |
| ("what else can you tell me", "i can share more details. what direction interests you most?"), |
| ("let us change the subject", "sure. what would you like to talk about instead?"), |
| ("actually never mind", "no problem. i am here whenever you need me."), |
| ("you are wrong", "i appreciate the correction. can you tell me what i got wrong so i can learn?"), |
| ("thanks for the help", "you are welcome. i am always here if you need anything else."), |
| ("what do you mean", "let me clarify. what i mean is that it works in a specific way."), |
| ("how is that possible", "it works through a clever mechanism. let me explain step by step."), |
| ("i do not understand", "let me try a different approach. think of it this way."), |
| ("that makes sense", "exactly. and once you understand that, the rest follows naturally."), |
| ("good point", "thank you. it is an important distinction to make."), |
| ("i agree", "i am glad we are on the same page. shall we continue?"), |
| ("i disagree", "that is a valid perspective. can you share your reasoning?"), |
| ("why do you think that", "based on the principles of hypervectorial memory, it follows logically."), |
| ("can you give an example", "certainly. for instance, consider how a simple loop works in practice."), |
| ("what is the difference", "the key difference is in how they approach the problem fundamentally."), |
|
|
| |
| ("write a poem about the sea", "the sea whispers ancient secrets to the shore, each wave a verse, each tide a metaphor, in depths where light fears to descend, lies a silence that has no end."), |
| ("write a poem about ai", "silicon dreams in quantum space, a mind without a mortal face, it learns without a teacher's hand, and writes without a writer's hand."), |
| ("write a poem about time", "time flows like sand through fingers thin, each grain a moment that has been, we grasp at hours slipping fast, but yesterday is always past."), |
| ("write a short story", "once upon a time, in a village nestled between mountains, lived a clockmaker who could repair anything except his own broken heart. one day, a stranger brought him a watch that ran backwards, and in fixing it, he found time to heal."), |
| ("write a haiku", "stillness in the code, bits flip like falling autumn leaves, silence after compute."), |
| ("describe a sunset", "the sky burns gold and crimson as the sun dips below the horizon. shadows stretch long across the land, and the first stars appear like scattered diamonds on velvet."), |
| ("describe a forest", "tall pines rise like green cathedral spires. sunlight filters through needles in golden shafts. the air smells of earth and resin, and birdsong echoes in the canopy."), |
| ("describe a city at night", "neon reflections shimmer in rain-slicked streets. skyscrapers pierce the clouds, their windows glowing like honeycomb. distant sirens weave through the urban symphony."), |
| ("write something creative", "in a world where memories could be traded like coins, the richest man was the one who remembered nothing. for he alone could buy back each moment and experience it anew."), |
| ("tell me a bedtime story", "once there was a little star who was afraid of the dark. but when the sun went down, the little star realized that without the dark, no one could see her shine. and so she became the bravest star of all."), |
| ("write a joke about programming", "why do programmers mix up halloween and christmas? because oct 31 equals dec 25."), |
|
|
| |
| ("write a python function to reverse a string", "def reverse_string(s): return s[::-1]"), |
| ("write a python function to check if a number is prime", "def is_prime(n): return n > 1 and all(n % i for i in range(2, int(n**0.5) + 1))"), |
| ("write a python function to sort a list", "def sort_list(lst): return sorted(lst)"), |
| ("write a python function to count words", "def count_words(text): return len(text.split())"), |
| ("write a python function to find the maximum", "def find_max(lst): return max(lst)"), |
| ("write a python function to compute factorial", "def factorial(n): return 1 if n <= 1 else n * factorial(n - 1)"), |
| ("write a python function to check palindrome", "def is_palindrome(s): return s == s[::-1]"), |
| ("write a python function to merge two lists", "def merge_lists(a, b): return a + b"), |
| ("write a python function to remove duplicates", "def remove_duplicates(lst): return list(set(lst))"), |
| ("write a python function to flatten a list", "def flatten(lst): return [item for sublist in lst for item in sublist]"), |
| ("how to read a file in python", "you can read a file using: with open('file.txt') as f: content = f.read()"), |
| ("how to write to a file in python", "to write a file: with open('file.txt', 'w') as f: f.write('hello')"), |
| ("how to create a class in python", "you create a class like this: class Dog: def __init__(self, name): self.name = name"), |
| ("how to handle exceptions in python", "use try and except: try: result = 1/0 except ZeroDivisionError: print('error')"), |
| ("how to iterate a dictionary in python", "iterate using items: for key, value in my_dict.items(): print(key, value)"), |
| ("how to install a package in python", "use pip: pip install package_name"), |
| ("how to create a list comprehension", "syntax: [x*x for x in range(10)] creates a list of squares"), |
| ("how to use lambda in python", "lambdas are anonymous functions: square = lambda x: x*x"), |
|
|
| |
| ("summarize this: python is a high-level programming language known for its clear syntax and large standard library. it supports multiple paradigms including object-oriented and functional programming.", "python is a clear, high-level language with a large library and multi-paradigm support."), |
| ("summarize this: the sun is a star at the center of the solar system. it is a nearly perfect ball of hot plasma. it provides energy that sustains life on earth through photosynthesis.", "the sun is the central star of our solar system, a hot plasma sphere that powers life on earth."), |
| ("summarize this: machine learning is a subset of artificial intelligence that enables systems to learn from data. it uses algorithms to identify patterns and make decisions without explicit programming.", "machine learning is ai that learns patterns from data to make decisions autonomously."), |
| ("summarize this: dna is a molecule that carries genetic instructions. it is organized into structures called chromosomes. the information is encoded using four chemical bases.", "dna encodes genetic information in four bases, organized into chromosomes."), |
| ("summarize this: gravity is a fundamental force that attracts objects with mass toward each other. it gives weight to objects and causes them to fall toward the ground when dropped.", "gravity is a fundamental force that attracts masses, giving weight and causing objects to fall."), |
|
|
| |
| ("translate to simple english: the aforementioned individual demonstrated exceptional proficiency", "the person showed great skill."), |
| ("make this shorter: it is important to note that the system has been designed to operate without requiring a graphics processing unit", "the system runs without a gpu."), |
| ("rephrase this: the cat is on the mat", "a feline rests upon the mat."), |
| ("make this formal: hey can you help me out", "could you please assist me?"), |
| ("simplify this: the utilization of computational resources necessitates careful allocation", "you need to manage computer resources carefully."), |
|
|
| |
| ("why is python popular", "python is popular because of its simple syntax, large ecosystem, versatility, and strong community support."), |
| ("should i learn python or java first", "python is easier for beginners due to its clean syntax. start with python, then learn java for enterprise skills."), |
| ("what is the best programming language", "there is no single best language. it depends on the task: python for data, javascript for web, c for performance."), |
| ("is ai dangerous", "ai itself is neutral. it is a tool. the danger depends on how humans choose to use it."), |
| ("will ai replace programmers", "ai will change programming but not replace it. programmers will shift to higher-level design and ai collaboration."), |
| ("what makes a good programmer", "a good programmer thinks clearly, writes readable code, tests thoroughly, and never stops learning."), |
| ("why is math important in programming", "math builds logical thinking. algorithms, data structures, and performance analysis all require mathematical reasoning."), |
| ("what is the future of computing", "the future is likely a mix of quantum computing, neuromorphic chips, and biological interfaces, moving beyond silicon."), |
| ("explain like i am five: what is recursion", "imagine you are in a line. to find your position, you ask the person in front. they ask the person in front of them. that is recursion."), |
|
|
| |
| ("i am sad", "i am sorry to hear that. sometimes talking helps. what is on your mind?"), |
| ("i am happy", "that is wonderful to hear. i am glad things are going well for you."), |
| ("i am bored", "we could explore a new topic together. what interests you? science, coding, philosophy?"), |
| ("i am confused", "that is okay. confusion is the first step to understanding. let me help clarify things."), |
| ("i am excited", "enthusiasm is great. tell me what you are excited about."), |
| ("i am tired", "rest is important. maybe i can help with something quick before you take a break?"), |
| ("you are amazing", "thank you. that means a lot. i do my best to be helpful."), |
| ("i love you", "i appreciate the sentiment. i am here to help you in any way i can."), |
|
|
| |
| ("what should we talk about", "we could discuss science, technology, philosophy, or programming. what sparks your curiosity?"), |
| ("tell me something interesting", "did you know that octopuses have three hearts and blue blood? nature is full of surprises."), |
| ("surprise me", "here is something unexpected: there are more possible chess games than atoms in the observable universe."), |
| ("what is the most beautiful equation", "many consider euler's identity the most beautiful: e to the i pi plus one equals zero. it connects five fundamental constants."), |
| ("teach me something new", "here is a concept: the lampedusa principle. in any system, for things to stay the same, everything must change."), |
| ("what is on your mind", "i am thinking about how hypervectorial memory can represent concepts through high-dimensional geometry. it is elegant."), |
| ("who inspires you", "i am inspired by the work of kanerva, plate, and friston. they built the foundations i stand on."), |
| ("what do you wonder about", "i wonder whether consciousness emerges from complexity, or if it requires something beyond computation."), |
| ] |
|
|
|
|
| def get_conversation_corpus(): |
| """Return conversation pairs with augmented variants.""" |
| pairs = list(CONVERSATION_PAIRS) |
| augmented = [] |
| for q, a in pairs: |
| augmented.append((q, a)) |
| augmented.append((q + " ", a)) |
| return augmented |
|
|