Borges has some very philosophical short stories. For example Tlön, Uqbar, Orbis Tertius is a story in wich the philosophic idealism of Berkeley is viewed as the common sense.
Quoting the blessed Wiki:
Through the vehicle of fantasy or speculative fiction, this story playfully explores several philosophical questions and themes. These include, above all, an effort by Borges to imagine a world (Tlön) where the 18th century philosophical idealism of George Berkeley is viewed as common sense and "the doctrine of materialism" is considered a heresy, a scandal, and a paradox. Through describing the languages of Tlön, the story also plays with the epistemological question of how language influences what thoughts are possible. The story also contains several metaphors for the way ideas influence reality. This last theme is first explored cleverly, by way of describing physical objects being willed into existence by the force of imagination, but later returns darker, as fascination with the idea of Tlön begins to distract people from paying adequate attention to the reality of earth.
Much of the story engages with the philosophical idealism of George Berkeley, who questioned whether it is possible to say that a thing exists if it is not being perceived. (Berkeley, an Anglican bishop, resolved that question to his own satisfaction by saying that the omnipresent perception of God ensures that objects continue to exist outside of personal or human perception.) Berkeley's philosophy privileges perceptions over any notion of the "thing in itself." Immanuel Kant accused Berkeley of going so far as to deny objective reality.
In the imagined world of Tlön, an exaggerated Berkeleian idealism without God passes for common sense. The Tlönian view recognizes perceptions as primary and denies the existence of any underlying reality. At the end of the main portion of the story, immediately before the postscript, Borges stretches this toward its logical breaking point by imagining that, "Occasionally a few birds, a horse perhaps, have saved the ruins of an amphitheater" by continuing to perceive it. Besides commenting on Berkeley's philosophy, this and other aspects of Borges's story can be taken as a commentary on the ability of ideas to influence reality. For example, in Tlön there are objects known as hrönir that arise when two different people find the "same" lost object in different places.
Borges imagines a Tlönite working his way out of the problem of solipsism by reasoning that if all people are actually aspects of one being, then perhaps the universe is consistent because that one being is consistent in his imagining. This is, effectively, a near-reconstruction of the Berkeleian God: perhaps not omnipresent, but bringing together all perceptions that do, indeed, occur.
This story is not the only place where Borges engages with Berkeleian idealism and with the related 20th century philosophy of phenomenology. Phenomenology privileges psychical phenomena over physical phenomena and "brackets off" objective reality as unknowable. In the world of Tlön, as in Borges's essay New refutation of time (1947), there is (as Emir Rodríguez Monegal and Alastair Reid comment) a "denial of space, time, and the individual I." This worldview does not merely "bracket off" objective reality, but also parcels it separately into all its successive moments. Even the continuity of the individual self is open to question.
When Borges writes "The metaphysicians of Tlön are not looking for truth or even an approximation to it: they are after a kind of amazement. They consider metaphysics a branch of fantastic literature," he can be seen either as anticipating the extreme relativism that underlies some postmodernism or simply as taking a swipe at those who take metaphysics too seriously.